How to output from a ActiveX task?

  • I have an ActiveX task that modifies SQL text in another task. How can I output text from my ActiveX task to my output file for testing? I tried the print command inside the ActiveX task, and then scheduled the job and setup an output file. The job ran fine, but the print command didn't add any text to my output file.

    I am running SQL 2000 on Windows 200 Server.

    Thanks in advance to any responses to this post.


    Live to Throw
    Throw to Live
    Will Summers

  • What is the code that you used to print the text?

    Russel Loski, MCSE Business Intelligence, Data Platform

  • print SelectStmt

    (just the basic VB command - SelectStmt is my variable)


    Live to Throw
    Throw to Live
    Will Summers

  • I've never used the print statement and I couldn't get it to work.

    Try this:

    dim fso

    dim txt

    set fso = CreateObject("Scripting.FileSystemObject")

    set txt = fso.GetStandardStream(1) ' Get the stdout

    txt.WriteLine SelectStmt

     

    Russel Loski, MCSE Business Intelligence, Data Platform

  • I found that this code returns an error if run in the designer.  You could put:

    on error resume next ' This will cause errors to not fire.

    Russel Loski, MCSE Business Intelligence, Data Platform

Viewing 5 posts - 1 through 4 (of 4 total)

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