Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetExecutionErrorInfo routine question

Status
Not open for further replies.

newtechy

Programmer
Sep 23, 2002
22
US
I created a DTS Package with 2 Active X script tasks. Both scripts invoke 2 other dts packages. To handle step failures from the other dts packages, I am using the GetExecutionErrorInfo routine. When a failure occurs in a step from the invoked dts packages, and the Active X tasks invoke the error routine, the following error message appears:

Error code 0
Error Desc: Type mismatch 'step.getexecutioninfo'

Does anyone know what the problem may be?? Am I using the right routine for what I am doing??
 
Variables declared in Activex script are of type varient. If you go through the help from Microsoft GetExecutionErrorInfo needs minimum variables of type long to populate error code, string to populate error source and string to populate error description. So when you are using activex variables, this will display your error message. To overcome this problem you have to work round way out.

1) Create a dll using C++ or visual basic which will accept your step object.

2) Declare three variables for error code(long), error source(string) and error description (string).

2) Use the method GetExecutionErrorInfo of the step object to populate the error related info into the above variables.

3) Return these values back.

4) Compile the code to a dll say sample.dll

5) Register this dll from command prompt on client machine or on the server.

6) In your activex script create object.

7) Call the function used in the dll with your step object as parameter when error occurs.

8) This will give the exact error message from child packages.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top