August 9, 2005 at 12:27 pm
The following VBScript generates an error during runtime even though it parses no problem in DTS...
Function Main()
DTSGlobalVariables("Counter").Value = DTSGlobalVariables("Counter").Value + 1
DTSGlobalVariables("FileName").Value = DTSGlobalVariables("FileName").Value & CStr( DTSGlobalVariables("Counter").Value )
DTSGlobalVariables("FileName").Value = DTSGlobalVariables("FileName").Value & ".MAIL"
Main = DTSTaskExecResult_Success
End Function
Global var "Counter" = integer
Global var "FileName" = string
The error is..."Variable uses an automation type not supported in VBScript."
"Error on Line 1"
I used the VBScript Language builder in DTS to create this.
Any thoughts?
August 9, 2005 at 2:52 pm
Martin,
Try this - DTSGlobalVariables("Counter").Value = CINT(DTSGlobalVariables("Counter").Value) + 1
Good Luck,
Darrell
August 9, 2005 at 3:02 pm
That worked.
Thank you for your help.
August 9, 2005 at 3:27 pm
I get lucky once in a while!!
Glad to be of assistance.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply