question

Leks avatar image
Leks asked

SQL Server 2000 DTS

Hi, I want to pass in a variable from my T-SQL and use it as a parameter in my Dynamic task properties task. is this possible? I am trying to pass in my parameter this way xp_cmdShell 'dtsrun /works /works/works/NworksTEST_global /A cValue:8=E' I want to use the ComposValue in the Dynamic Properties Task - something like - Select * from [table] where c = DTSGlobalVariables("ComposValue").Value Is this possible? Is there another approach I need to be looking at instead? Thanks!
dtsdynamictaskparamaters
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
An alternative approach would be to have that value put in a specific place in the database (ie a table) just before you call `dtsrun`, and then alter the DTS script to pull the value out of the table before passing it to your Dynamic properties task...
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
OK. According to my SQL 2000 DTS book, you need to use the format: DTSRUN /A "VariableName":"DataTypeID"="Value" The quotes are required. See also [MSDN on DTSRun][1]. There are a couple of caveats in that link. If you want to build a sample command line to see what it should look like, try running `DTSRUNUI` [1]: http://msdn.microsoft.com/en-us/library/aa224467(v=sql.80).aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.