Issue in DTS using Store Proc. with Argument

  • Hi,

    Wihle using store procedure with input argument from DTS global variable...the SP seems not doing the specific task defined within the SP.

    When the same SP executed in Query Analyser, It works...

    pls note that in Task1, i am inserting records to table T1, in the second task(Task2)  i am calling SP to update few col in T1...this where updation is not done.

    Pls advice what wrong i am doing. Thz in advance

    Regards

    Sara

     

     

  • Try adding "SET NOCOUNT ON" in your sp's.

    Also, check your server/database connection where your sp's are set to execute.  Maybe they are not set to what you think if these sp's exist in more than 1 db?

    Jeff

  • Thz Jeff,

    i included SET NOCOUNT ON begin of sp, at the end SET NOCOUNT OFF

    but i still face the same problem, my connections to db is correct.

    when i execute individual task it works (also works when i execute in Query analyser ).  Pls advise. thz

    regards

    Sara

     

     

     

  • Are you doing error trapping in your s.p.:

    DECLARE @ErrorInsert INT, @ErrorUpdate INT, @ErrorFinal INT

    INSERT ...

    SET @ErrorInsert=@@ERROR

    UPDATE ...

    SET @ErrorUpdate=@@ERROR

    IF @ErrorInsert <> 0 SET @ErrorFinal=@ErrorInsert

    IF @ErrorUpdate <> 0 SET @ErrorFinal=@ErrorUpdate

    RETURN @ErrorFinal

    This will return an error code back to DTS so that you can diagnose the problem.  Also, it will help to turn on error logging to a file.

    Jeff

     

  • Jeff,

    Even after using @@error i could not find any error.

    But managed to get rid of prob, by spliting the dts as 2 package.

    anyhow thanks man for u'r advise.

    Regards

    sara

     

     

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

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