Re: Testing Global Output Variable Value
From: Robert Richards via SQLMonster.com (forum_at_SQLMonster.com)
Date: 01/17/05
- Next message: tbithoney: "DTS & FTP"
- Previous message: silven: "Re: DTS task fails no ERROR"
- In reply to: Allan Mitchell: "Re: Testing Global Output Variable Value"
- Next in thread: Ed: "RE: Testing Global Output Variable Value"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 17:59:52 GMT
I am still getting the same error. This is what I have verbatim for my script:
Function Main()
Dim resp
resp = MsgBox("The row count in table IFSMessages is: " & DTSGlobalVariables("gMsgCount").Value, VBYesNo)
if resp = VBYes then
'execute package
else
'do not execute package
end if
Main = DTSTaskExecResult_Success
End Function
When I execute the ActiveX object step I get a VBScript error saying "Variable uses an automation type not supported in VBScript."
Within the ActiveX Script Task properties, Package Object Browser under Global Variables I am able to see the output variable "gMsgBox" that I created in Execute SQL Task.
Within Execute SQL Task my SQL Statement verbatim is:
select count(*) as msgcount from ifsmessages
When I select the Parameters button and then the Output parameters tab, I have Row value output parameter type option selected. Below that I have in Parameter Mapping a parameter of "msgcount" and Output Global Variables as "gMsgCount".
Any idea why I am getting the above error? If I remove the reference to DTSGlobalVariables("gMsgCount").Value in the MsgBox statement the script executes without the error, but obviously I do not get a count because the global variable is not being referenced.
-- Message posted via http://www.sqlmonster.com
- Next message: tbithoney: "DTS & FTP"
- Previous message: silven: "Re: DTS task fails no ERROR"
- In reply to: Allan Mitchell: "Re: Testing Global Output Variable Value"
- Next in thread: Ed: "RE: Testing Global Output Variable Value"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|