![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Folks Using SQL Server 2000 SP3 I'm using the GetExecutionErrorInfo in ActiveX Scripting tasks to try and get error information but the GetExecutionErrorInfo does not return any data except an error code of zero... consequently the elbaorate tracing and error handling system we have built around our DTS packages is a bit redundant until we get meaningful error information propogated out of DTS. Typical example: I have a copy SQL Server object task which adds data to a table with a PK. If I try and add the same data again, I should get a Primary Key constraint error... It does error but the Package GetExecutionErrorInfo does not contain any SQL Error message. Can anybody point me in the right direction to sort this out? Ta Dirc GetExecutionErrorInfo uses ByRef parameters to pass back the information |
#3
| |||
| |||
|
|
In article <u4zjXvwRDHA.1220 (AT) TK2MSFTNGP12 (DOT) phx.gbl>, Dirc dirc.khan-evans (AT) eqos (DOT) com> writes Folks Using SQL Server 2000 SP3 I'm using the GetExecutionErrorInfo in ActiveX Scripting tasks to try and get error information but the GetExecutionErrorInfo does not return any data except an error code of zero... consequently the elbaorate tracing and error handling system we have built around our DTS packages is a bit redundant until we get meaningful error information propogated out of DTS. Typical example: I have a copy SQL Server object task which adds data to a table with a PK. If I try and add the same data again, I should get a Primary Key constraint error... It does error but the Package GetExecutionErrorInfo does not contain any SQL Error message. Can anybody point me in the right direction to sort this out? Ta Dirc GetExecutionErrorInfo uses ByRef parameters to pass back the information such as error description etc. These are type variables, long and string etc. ActiveX Script only has the variant type. For ByRef to work the types must match exactly. Using CStr and similar only suppresses the error by ensuring the data passed in is type correctly, but does not change the variant to a true string. You will need to use a strongly type language. You could write a DLL in VB that could be called from ActiveX Script o even write a custom taks to do the entire error capture job. Using a custom task gives reuse too, without copy and paste of code between packages. -- Darren Green (SQL Server MVP) DTS - http://www.sqldts.com |
#4
| |||
| |||
|
|
I know!.. I've seen this before... snip |
|
You could write a DLL in VB that could be called from ActiveX Script o even write a custom task to do the entire error capture job. Using a custom task gives reuse too, without copy and paste of code between packages. |
![]() |
| Thread Tools | |
| Display Modes | |
| |