Printing to an output file

  • I have a DTS Package with an ActiveX Script. I want the ActiveX Script to print to the file I re-direct the package execution to. Is there an easy way to do this?

    I have tried this:

    If cmdNew.Parameters("@RUNNING") = True Then

    Print "The " & DTSGlobalVariables("gvsInterfaceName").Value & " is currently running. Failing package!"

    Main = DTSTaskExecResult_Failure

    ElseIf cmdNew.Parameters("@RUNNING") = False Then

    Print "The " & DTSGlobalVariables("gvsInterfaceName").Value & " is currently not running. Continuing package!"

    Main = DTSTaskExecResult_Success


    msgbox "The interface " & DTSGlobalVariables("gvsInterfaceName").Value & " is not a valid interface!"

    Main = DTSTaskExecResult_Failure

    End If

    And the Print statements do not work.


  • Usually the best way to write to a file is with the file scripting object. Short sample:

    set oFSO=createobject("scripting.filesystemobject")

    Set oFile = fso.CreateTextFile("filename", False)

    oFile.WriteLine "log something here"

    Try for reference material.


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

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