Results 1 to 3 of 3

Thread: DTS return

  1. #1
    Join Date
    Mar 2003
    Posts
    2

    Unanswered: DTS return

    I am trying to execute a DTS package which will update four tables on a central server from various souces (each source will insert records into all four tables).

    We are running this code by calling a stored procedure from VB, which includes code to execute the DTS package. The problem I am having is the VB code continues on even though the package has completed.

    SET @SQLStr = 'DTSRun /S CENTRAL1 /N DTS_TEST_HU_MoveCenterScreens /E'
    EXEC @Result = Master.dbo.xp_cmdshell @SQLStr

    I return @Result. I would have thought that the return value from the execution of the sql package would not return until it was completed. However, it returns right away. The package takes about 10 mintutes to run, but the return variable is populated in less than a second.

    The next step of the process relies upon the dts's completion.
    I am using SQL 2000 as my DB

    Any thoughts?

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    You should take a look at this article:

    Execute DTS via Stored Procedure

    Have you thought about executing DTS from VB?
    MCDBA

  3. #3
    Join Date
    Mar 2003
    Posts
    2
    Thank you for the response. While I was still trying to figure out what to do I started to explore VB and found the DTS object. We are now using that object and it has solved my problems.
    As for the link, I was trying to utilize the return variable but my code continued to execute even if the dts package was not complete.


    Originally posted by achorozy
    You should take a look at this article:

    Execute DTS via Stored Procedure

    Have you thought about executing DTS from VB?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •