Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Kimsi
Starting Member
1 Post |
Posted - 2008-10-30 : 16:50:16
|
Hi,I am trying to pass a global variable to an Active X Script task in DTS which internallty is calling a stored procedure and to this stored procedure i want to pass this global parameter.G_ID is the globalVariable name which i have declared for the PACKAGE.Function Main()Dim mycon, conString, theCommand, commandStringconString = "Provider=OraOLEDB.Oracle.1;Password=password;Persist Security Info=True;User ID=ABC;Data Source=IPod.world;"Set mycon = CreateObject("ADODB.Connection")Set theCommand = CreateObject("ADODB.Command")mycon.Open conString thecommand.CommandText = "IPODReports.loy_Ping_unit_pkg.INSERT_SP( DTSGlobalVariables("G_ID").value)"thecommand.CommandType = 4 'adCmdStoredProcthecommand.ActiveConnection = myconthecommand.Execute()mycon.closeMain = DTSTaskExecResult_SuccessEnd FunctionError Expected END of STATEMENT on this line->thecommand.CommandText = "IPODReports.loy_Ping_unit_pkg.INSERT_SP( DTSGlobalVariables("G_ID").value)"Any one can help me with this?Thanks |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-10-31 : 02:41:15
|
Maybe like this, but don't really know:thecommand.CommandText = "IPODReports.loy_Ping_unit_pkg.INSERT_SP(" & DTSGlobalVariables("G_ID").value & ")"Webfred No, you're never too old to Yak'n'Roll if you're too young to die. |
|
|
|
|
|