October 8, 2004 at 9:30 am
I wish to create a global variable either by entering it on the global variable tab or thru a VB ActiveX script.... from here on in... I want to access and use as a T-SQL variable the DTS global variable... I wish to use the variable directly from T-SQL code and T-SQL (Version: SQL Server 2000) available commands and calls. No intermediaries (T-SQL run from VB, ActiveX, etc.).... How is it done?
October 8, 2004 at 9:40 am
Research using parameters with Stored-Procedures in DTS. You create the global variable and then in the Execute SQL task add parameter(s) as ?
Then add the parameter(s) in order on the parameter tab.
I think this will only work for stored-procedures.
Good Hunting!
AJ Ahrens
webmaster@kritter.net
October 8, 2004 at 10:39 am
I understand... but it doesn't answer the question... Let's say I have created a DTSGlobalVariable called "MyVariable" and it contains a varchar with the value of "ShoeFly"... Now I wish to execute a T-SQL command from a T-SQL DTS task and I wish to say???
select count(*) from My_Table where Table_Column = DTSGlobalVariable.MyVariable ?????
Remember no VB, ActiveX or anything else except T-SQL statements, commands, and calls...
And the reverse is also needed...
Declare DTSGlobalVariable.MyVariable VARCHAR(132) ?????
Set DTSGlobalVariable.MyVariable = 'HorseFly' ?????
again... no VB, ActiveX or anything else except T-SQL statements, commands, and calls...
How is it from done from T-SQL statements, commands, and calls only??? I have no care to write VB or ActiveX anything....
October 9, 2004 at 6:17 am
You cant without using an ActiveX or Dynamic Properties object. You would then have to use the above information for the parameter for the stored-procedure.
Without using the DTS objects I dont think you will be able to perform your desired result
Good Hunting!
AJ Ahrens
webmaster@kritter.net
October 11, 2004 at 9:10 am
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply