Firing events in script task

Posted by Anonymouslemming on Stack Overflow See other posts from Stack Overflow or by Anonymouslemming
Published on 2010-06-14T13:45:17Z Indexed on 2010/06/14 13:52 UTC
Read the original article Hit count: 169

Filed under:
|

I've got an SSIS project where I am constructing an SQL command based on some variables. I'm constructing the command in a script task, and want to output the constructed SQL to the 'Execution Results' window. I am trying to do this using a FireInformation line from inside my script as follows:

Dts.Events.FireInformation(99, "test", "Make this event appear!", "", 0, true);

However, in the script editor when editing ScriptMain.cs, that line is underlined in red, and on mouseover, I get the following message:

Error:
The best overloaded method match for 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.EventsObjectWrapper.FireInformation(int, string, string, string, int, ref bool') has some invalid arguments

As a result, my script does not compile and I cannot execute it.

Any idea what I'm doing wrong here, or what I need to change to be able to see the values of my variables at this point in the Execution output?

© Stack Overflow or respective owner

Related posts about c#

Related posts about ssis