June 8, 2005 at 1:51 pm
Hi,
I am calling an executable by using
EXECUTE master..xp_cmdshell 'xyz.exe'
I know that I can capture the int result by:
That works fine.
My executable also writes out text to the console.
Execute appears to convert the text into rows in a temp table in a column called output. For example if my exe writes "Hi Rick" to the console, I get a result with one row with a column called Output with the contents "Hi Rick"
Can I access that temp table?
I have seen code that redirects standard out to a text file, and then BULK INSERTS into a temp table tha
Is there a simpler way that omits the redirection and bulk insert?
Rick Hodder
June 8, 2005 at 2:07 pm
CREATE TABLE #xyzout ...
Insert into #xyzout (FieldName) EXECUTE master..xp_cmdshell 'xyz.exe
Select * from #xyzout
June 8, 2005 at 2:16 pm
Perfect!
Rick Hodder
June 8, 2005 at 2:34 pm
HTH.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply