Monday, March 19, 2012

Examples for using DirectRow method?

Hi!

I was just wondering if there are any examples on how to work with the Script Editor, and more specifically how to use the DirectRow method? I've seen some examples that say that the editor automatically creates the methods DirectRowTo<output buffer>, but it doesn't say how that is done. If I just specify Row.DirectRow(output buffer #), it says that the method is protected.

Any help or just pointing me in the right direction would be greatly appreciated!

Thanks!

Jeff Tolman
E&M Electric
jeff.tolman@.enm.com

Ok, I seemed to have found an example of using the DirectRow method in the ProcessInput method. I was initially trying to write my code in the ProcessInputRow method because I need to direct each row to 1 of 3 output buffers. Is this not possible? Here's a small summary of what I'm trying to do for each row:

If this row needs to be deleted then
Send it to the DeleteBuffer
Else
If the destination table already has the row then
Send it to the UpdateBuffer
Else
Send it to the InsertBuffer
End If
End If

Is a Script Transformation component the best way to do this? I'm a newbie when it somes to SSIS projects so I'll accept ANY suggestions at this point!

Thanks!

Jeff

|||

This should be a big help: http://www.sqlis.com/default.aspx?311

-Jamie

|||

That's what I needed!

Thanks Jamie!

No comments:

Post a Comment