May 14, 2012 at 3:12 pm
I am using OpenRowSet to read a single row from an Excel spreadsheet and update the value of a package scoped variable with the contents of one of the cells in the row. I read the row successfully -and pass the single row to a data flow script. In the script I assign the value of one of the cells to a script scoped variable. In the PostExecute() I set the value of the package scoped variable to the script scoped variable. However, I haven't found a way to make the PostExecute() run.
I've done this sort of thing before and the PostExecute runs as expected
<Microsoft.SqlServer.Dts.Pipeline.SSISScriptComponentEntryPointAttribute> _
<CLSCompliant(False)> _
Public Class ScriptMain
Inherits UserComponent
Dim scrMthStr As String
Public Overrides Sub PostExecute()
MyBase.PostExecute()
'Lets see if we get anything...
MsgBox(scrMthStr)
Me.Variables.MthStr = scrMthStr
End Sub
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
scrMthStr = Row.MthStrIn
End Sub
May 14, 2012 at 6:30 pm
What is SSIS Logging showing you?
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
May 14, 2012 at 6:55 pm
I'll have to check logging tomorrow afternoon. I will be tied up until then. Thanks.
May 15, 2012 at 5:48 am
Problem solved. The script was pushing data into a derived column transformation with a data viewer in between. When I elimnated the data viewer the script ran correctly. It seems a bit odd that the post execute in the script is acutally a post execute for the data flow, but it seems so.
May 15, 2012 at 5:53 am
Good lead Barry. I turned on logging and noticed that practically nothing happened, including PostExecute, until I took the data viewer out and let the package run to completion. Thanks again.
May 15, 2012 at 12:05 pm
nano2nd (5/15/2012)
Good lead Barry. I turned on logging and noticed that practically nothing happened, including PostExecute, until I took the data viewer out and let the package run to completion. Thanks again.
Yeah, it's funny but hardly anyone seems to use logging normally. But it's been my experience that SSIS is almost impossible to diagnose without it, so I always set it up in production to do at least minimal logging and then switch it to full logging whenever I need it.
I've learned tons about SSIS's strange processes, just from looking at these logs... 🙂
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply