![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I'm trying to test some DTS packages, and ran into the familiar problem that the package itself doesn't accurately report errors in the steps - beyond "the step failed". Tried running the package in the DTS Designer, tried running it by knocking together a VB utility (using the DTS.Package2.Execute method, with FailOnError=True, then calling GetExecutionErrorInfo for each step in the package) - even tried running WithEvents and using the package OnError event handler, with all the hideous problems that involves. None of these give me any information of any use about errors - and I'm sure I managed to get useful error information at some point in the past (in a previous job, on some other company's server). The result is always the same: all I get is the moronically useless message "ActiveX Scripting encountered a Run Time error during the execution of the script". I'm sure this didn't use to happen - I know how to use GetExecutionErrorInfo for a reason! I used to get sensible error messages out of ActiveX scripts in DTS packages. Is there some basic version issue/switch/setting issue I'm missing? I'm running SQL2K client tools talkign to a SQL2K Developer Edition server. thanks for any help Seb Thirlway |
#3
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |