Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Posts
    17

    Unanswered: xp_cmdshell - need to execute external program asynchonous

    hi,

    i need to start an external program (vb.net) from within a trigger. via xp_cmdshell everything works fine except that the execution of the trigger waits for the vb-program to finish.

    now i tried a workaround with a "starter application" which only calls the vb.net program (asynchronous) an ends.

    this works fine from a dos prompt (command prompt returns immediately and vb.net task is running). but when i call the starter app from the trigger with xp_cmdshell, the behavior is the same as before: execution does not continue until the vb.net task ends.

    any other ideas that could solve my problem? submitting an agent-job is not fine for me because i need to supply parameters to the called program and maybe i need call it more than once at the same time.

    thanks
    thomas

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    For c:\MyProgram.exe, I'd use:
    Code:
    EXECUTE master.dbo.xp_cmdshell 'start c:\MyProgram.exe'
    -PatP

  3. #3
    Join Date
    Aug 2002
    Posts
    17
    thank you pat,
    this is much easier than what i have done...
    but unfortunately it does not change anything, the trigger still waits.

    thomas

Posting Permissions

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