Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Wednesday, March 21, 2012

Package fails but single Task ends with success

Hi

I've created a simple package that contains only one task that is an execute sql task. When I run only this single task from Business Intelligence development studio it runs successfully. But when I run the whole package (also from Business intlligence studio), the package fails.

The data source I access is ODBC. I'm sure the real reason for the error is the bad ODBC driver of the data source but this can't be changed. So I need to know what is different from running only a task in a package to running the whole package. If I knew that I might be able to adjust some setting and make it work.

Any help welcome.

What is the error you are receiving?

Rafael Salas

|||I had a similar probem the other day.

all the individual steps would run ok in visual studio, but the package as a whole would fail.

the problem was a spurious executable that was not visible on the control flow design screen, but was listed as an executable in package explorer.

its was this spurious executable that was failing, and so causing my package to fail.

have a look to see what is shown as an executable in the package explorer tab?|||

Hi Rafael

Thanks for your answer.

I get the messagebox-error with "Unable to load DLL, Fatal Error!" in the messagebox title and the dll's path in the message body. The dll that is indicated there belongs to the system that should be accessed.

Christian

|||

I've checked the package in package explorer but there's only the one executable that I've just created.

Christian

sql

Package Execution with Custom UI

Hi:

I need a user to pass an input to a package from a VB form, and then want to show progress/errors in the form.

I have been able to use Application. LoadFromSqlServer and I then set pkg.Variables.(MyVariable) to the required value before calling Execute.

Works fine so far.

I dont know how to show progress. The DTSExecResult just returns a Cryptic Success /Failure status message.

Is there a way to log the errors if any to my Windows form? I have seen samples on Console Apps(see below) but I would prefer to show it in my Windows form in a text Box or something, appending each error result to the text.

TIA

Kartik

Code Snippet

Class EventListener
Inherits DefaultEvents

Public Overrides Function OnError(ByVal source As Microsoft.SqlServer.Dts.Runtime.DtsObject, _
ByVal errorCode As Integer, ByVal subComponent As String, ByVal description As String, _
ByVal helpFile As String, ByVal helpContext As Integer, _
ByVal idofInterfaceWithError As String) As Boolean

' Add application�Cspecific diagnostics here.
Console.WriteLine("Error in {0}/{1} : {2}", source, subComponent, description)
Return False

End Function

End Class

That's the code you want - you need to capture the events, and write to a text box instead of the console.

Saturday, February 25, 2012

Overloaded Stored Procedure

Hi

I want to create two stored procedures with the same name but accepting different params. Lets say Procedure A can accept param1, Procedure A can also accept param1,param2.

Is there any way SQL Server supports overloaded procedures with different sigantures.

Regards
ImtiazYou can use a feature called numbered stored procedures. So you can create somesp;1 and somesp;2. But I would not recommend doing this since the feature is being deprecated. In general, for data access or modifications you want to keep the TSQL interfaces simple to use.|||Thanks..As expected u had replied.....|||Can we also have something like overloaded functions in SQL 2005.|||No, but optional parameters are supported: CREATE PROC YourProc @.Param1 INT, @.Param2 INT = 0 AS ... -- Adam MachanicPro SQL Server 2005, available nowhttp://www..apress.com/book/bookDisplay.html?bID=457-- <Imtiaz@.discussions.microsoft.com> wrote in message news:5dcaf46b-f56a-452b-b9a3-dc23f7c4e7a9@.discussions.microsoft.com...HiI want to create two stored procedures with the same name but accepting different params. Lets say Procedure A can accept param1, Procedure A can also accept param1,param2.Is there any way SQL Server supports overloaded procedures with different sigantures.RegardsImtiaz

Monday, February 20, 2012

Overflow error

Hi!

I created a VB6 program using MS Access DB and crystal reports 9. It works fine on WinXP, but I sometimes encounter an 'Overflow' error on Win98 SE.

For example, I have report A and B. When I start the program and immediately print report A, I encounter the error. But when I print report B first and then print report A, the errors gone. I think there's really no problem with the code...so what gives?

By the way, on some PCs with Win98, there's no problem too. Weird huh?

Thanks a lot!

This one's urgent...I'm too embarrassed already with the department using the program...I don't want them to think that I'm stupid or something hehe.Is there any link between those two reports?
Did you use any formula?|||Thanks for replying...

Regarding your question, the two reports are not linked...the data are also gathered from different tables, that is, I do all the necessary computations first and then load up a table for specific reports wherein data for the report will be gathered.