venus.pvr (10/3/2012)
Hi,I have a requirement to see if any rows are present in the input. If they exist, I just have to set a uservariable to true and exit.
Even if there are input rows, when I run the below I see 2 msg boxes, one with value true and other with false. And finally my uservariable is set as false. Why does it get called twice? How can I fix this?
Dim bool As Boolean
Public Overrides Sub Input0_ProcessInput(ByVal buffer As Input0Buffer)
bool = buffer.NextRow
MsgBox("Case1:" & bool)
End Sub
Public Overrides Sub PostExecute()
MyBase.PostExecute()
Me.Variables.case1 = bool
End Sub
Thanks and Regards,
Praveena
If this is script component used as a tranformation, Input0_ProcessInput will be called for each row, this could explain it running twice.
Not sure how you will get it to fire for no rows? You might be better served with a row count component.