February 12, 2007 at 2:11 pm
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.
February 12, 2007 at 2:22 pm
What is the code that you used to print the text?
Russel Loski, MCSE Business Intelligence, Data Platform
February 13, 2007 at 5:49 am
print SelectStmt
(just the basic VB command - SelectStmt is my variable)
February 13, 2007 at 6:37 am
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
February 13, 2007 at 6:50 am
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