DTS from VB6 ExecutePackage

  • I am trying to execute a package from VB6 using the ExecutePackage and LoadPackage object. I have the object declared using With Events keyword to trap errors in the package an terminate the program when encountered.

    The program runs great but once per day (or more) the DTS will stop executing with no error. The VB program is still responding and the DTS package still lists itself as executing when I query it but it does nothing and will not finish it's steps.

    Ideas? If I stop the program and start it, it runs well again on the same project.

    The DTS package is transfering records from one SQL Database to another on the same SQL server. The package does this even if the program is run on the SQL server itself. The last step run is rarely consistant and can be any of the 36 steps.

  • Do you know if the problem is happening during the last step? With 36 different last steps that could occur, sounds like it could be an error in one of them.

    See if you can track in down a little more.

  • I agree with Jon, I think you have to narrow it down some more. One way would be start by logging each step that gets run, that way you can see where its hanging up at. Another idea - script it all out and dump into VB, set the environment to break on all errors, see if something is happening that you're not getting in your event handler. There is also a chance it'll let you interrupt execution to see where it's at exactly.

    Another possibility is that you're running into a block or deadlock situation. When it happens again, run sp_who to see if anyone blocked/blocking.


  • It is not the last step. It is not a specific step. Like I said, if I stop and start the program, it restarts on the same entry in it's workflow table and continues on it's merry way until it stops responding.

    I left VB6 open, there is no error. The code is still responding to me. It does not post a error and exit. If I break, it breaks on the .Execute meathod.

    There is no blocking or locking, there is no waiting. The spid is sleeping with no wait. The command that it is running, I run in ISQL and it runs fine with 0 errors.

    The VB6 program does have a TCPIP OCX and it still responds to commands. If I run it interactive (different form) the form is responsive, the package status is executing.

    I have set the package to log all errors to a file, but there are no errors.

    it just stops moving.

  • Breaking on execute doesnt help you - you need to be INSIDE the package. Thats different than doing loadpackage followed by execute package.


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

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