Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Location
    Montreal
    Posts
    38

    Question Unanswered: Calling an external program

    Hi,

    Is there a stored proc or a function I can call from Query Analyzer to execute another .EXE and return when it's finished?

    I'd like something like
    SET @RET = sp_CallEXE('c:\mypath\myprogram.exe myparameters')

    (Except for the name of the function, there should be something that does this right? I mean, DTS does it already so it must be referring to a function or a SP.)

    I want an answer to so that I can validate that everything went well (hence the @RET variable)

    Thanks,

    Skip.

  2. #2
    Join Date
    Feb 2004
    Posts
    492
    xp_cmdshell may help you get where you want, but you'll have security issues to think about. It'll be something like "exec @ret=master..xp_cmdshell '...'"

Posting Permissions

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