![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm using the following code in an ActiveX Script Task to write to the package log for a DTS package: Function Main() DTSPackageLog.WriteStringToLog "Hey, what's this?" Main = DTSTaskExecResult_Success End Function When I look at the log after execution, my message shows up in the Task Detail, but the Status column has a big red "X" and the Error Code column |
|
Am I missing something? Or is that just the way it works? |
#3
| |||
| |||
|
|
Am I missing something? Or is that just the way it works? Yes, Something WRONG with instantiation of DTSPackageLog. |
|
Use the PackageLog object methods when custom tasks and the ActiveScriptTask object are to write task log records. A reference to PackageLog is passed as a parameter of the task Execute method. In task ActiveX scripts, it is available as the DTSPackageLog scripting object. |
|
Use WriteTaskRecord instead. This allows you to pass an error code. A zero or negative number will log a failure type message, postive number will log a success type message. "Blake Anderson" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message news:837EB65B-426F-40F0-AAD8-133C7F10638D (AT) microsoft (DOT) com... I'm using the following code in an ActiveX Script Task to write to the package log for a DTS package: Function Main() DTSPackageLog.WriteStringToLog "Hey, what's this?" Main = DTSTaskExecResult_Success End Function When I look at the log after execution, my message shows up in the Task Detail, but the Status column has a big red "X" and the Error Code column says "Failed." I've poked around on BOL and MSDN to see if there's something I'm missing, but I can't seem to figure out how to make it look like it's just a status message, and not some sort of failure. Am I missing something? Or is that just the way it works? |
![]() |
| Thread Tools | |
| Display Modes | |
| |