|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Stored Procedure and Command lineSimple question ...
From within an MS 2000 SQL database stored procedure, I need to execute a DOS command that runs an application AND pass a parameter from the stroed procedure to this command line application. I also need to receive back a parameter (result) from the DOS application into the stored procedure for furhter processing. An example with mock parameters set up would be greatly appreciated ... Thanks in advance. Hi
You can use xp_cmdshell to do this and there are examples in Books online including one that create a string from a variable. It is not a good idea to run any program that has a GUI. Depending on how your program outputs the return value you can either capture it to a file and then return use osql, Bulk insert, bcp, dts to load this into a table. Alternatively you may want to look at DTS to do it all such as http://www.sqldts.com/default.aspx?251 John Show quote "timjo916" <timjo***@discussions.microsoft.com> wrote in message news:5E664F62-A3CC-4DEC-B52E-8A20300FC459@microsoft.com... > Simple question ... > > From within an MS 2000 SQL database stored procedure, I need to execute a > DOS command that runs an application AND pass a parameter from the stroed > procedure to this command line application. I also need to receive back a > parameter (result) from the DOS application into the stored procedure for > furhter processing. > > An example with mock parameters set up would be greatly appreciated ... > > Thanks in advance.
Other interesting topics
|
|||||||||||||||||||||||