Global Variable in DTS

  • Hi !

    I have created a package with Execute SQL Task and it has the following query:

    Update authors set city = 'XXX' where au_lname = ?

    and i define global variable Test - String in the package properites.

    When i execute the package using DTSRUN:

    dtsrun /Sbalaji /Usa /P /Ntest_global /A"Test":"8"="White"

    dtsrun /Sbalaji /Usa /P /Ntest_global /A"Test:8=White"

    running successfully, but when i select the record from authors table still the value not updated. do let me know, where i'm going wrong.

    Thanks.


    Balaji

  • Balaji,

    In the step that you are using the ? parameter did you define the parameter for use?

    Open the Execute SQL Task > Click on Parameters button.  Click the drop-down in the left-hand column (should be next to parameter 1) and select the parameter you have defined inside.

    Another way to ensure that the DTSRun is set properly is to use the DTSRunUI utility which is located in the ...\Microsoft SQL Server\80\Tools\Binn

    This is a good tool to develop the DTSRun command quickly.  Unfortunately, with DTSRun it could be as simple as a space or /commands out of order causing this too...

    Good Luck



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Arhens,

    Thanx a lot for your reply. I tried the way u asked to add the parameter in Execute SQL Task, but still i'm facing the same problem. Trying running the same with DTSRUNUI, but couldn't see the result.

    Could u throw some more light on it.

    Thanx.


    Balaji

  • Arhens,

    Sorry i made a mistake, forget to save the changes after following ur instructions. Now it is working perfect. Thanx again.


    Balaji

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply