1
我有一個名爲Valint,我需要在一個腳本任務,讀/寫變量,但它似乎並沒有工作:SSIS讀/寫變量腳本任務
public class scriptmain
inherits usercomponent
dim counter as integer
dim Valint as integer
.....
Public sub new()
counter = 0
end sub
public overrides sub input0_processintputrow(byval row as input0buffer)
Dim vars as IDTSvariables100 = nothing
Me.variableDispenser.lockforread("User::Valint")
Me.variableDispenser.GetVariables(vars)
counter = CType (vars("User:: Valint").Value, integer)
vars.Unlock()
counter +=1
Me.VariableDispenser.LockoneForWrite("User::Valint", vars)
vars("User::Valint").Value = counter
vars.Unlock()
End Sub
對於某些原因我的輸出始終爲0