Changing DTS task log text?

  • Standard ActiveX output looks like this:

    Step 'DTSStep_DTSActiveScriptTask_4' failed

    Step Error Source: Microsoft Data Transformation Services (DTS) Package

    Step Error Description:The task reported failure on execution.

    Step Error code: 8004043B

    Step Error Help File:sqldts80.hlp

    Step Error Help Context ID:1100

    I want it to look like this:

    Step 'DTSStep_DTSActiveScriptTask_4' failed

    Step Error Source: Microsoft Data Transformation Services (DTS) Package

    Step Error Description: No file found!

    Step Error code: 8004043B

    Step Error Help File:sqldts80.hlp

    Step Error Help Context ID:1100

    I have seen a script to delete the entire log on sqldts.com, but that writes to a property of the package. I want to manipulate a property of the task. Is there such a property?

    TIA

  • This was removed by the editor as SPAM

  • You need to capture package errors ,decode them and send output to the package logfile. Below is VB code to do this (BTW the code below can generated automatically by saving your package as VB code). In your case you need to translate the code into ActiveX Script.

    '-----------------------------------------------------------------------------

    ' error reporting using step.GetExecutionErrorInfo after execution

    '-----------------------------------------------------------------------------

    Public Sub tracePackageError(oPackage As DTS.Package)

    Dim ErrorCode As Long

    Dim ErrorSource As String

    Dim ErrorDescription As String

    Dim ErrorHelpFile As String

    Dim ErrorHelpContext As Long

    Dim ErrorIDofInterfaceWithError As String

    Dim i As Integer

    For i = 1 To oPackage.Steps.Count

    If oPackage.Steps(i).ExecutionResult = DTSStepExecResult_Failure Then

    oPackage.Steps(i).GetExecutionErrorInfo ErrorCode, ErrorSource, ErrorDescription, _

    ErrorHelpFile, ErrorHelpContext, ErrorIDofInterfaceWithError

    MsgBox oPackage.Steps(i).Name & " failed" & vbCrLf & ErrorSource & vbCrLf & ErrorDescription

    End If

    Next i

    End Sub

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply