Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to Execute External Application

Author  Topic 

rikleo2001
Posting Yak Master

185 Posts

Posted - 2007-04-18 : 22:00:49
Hi Guys,

I have an EXE file which I want to execute it from Stored proceudre along with some input parameters.
How do I acheive this?
I tried this but didn't work
ECLARE @DBName SYSNAME
DECLARE @cmd Nvarchar(1000)
DECLARE @Path VARCHAR(100)
declare @result int

set @Path = 'D:\GeoGauge\'
SELECT @cmd = 'myexe.exe ' + @Path + 'abc.txt' + ' ' + @Path + 'xyz.dat'
EXEC @result = master.dbo.xp_cmdshell @cmd

Any ideas?


SKR

rikleo2001
Posting Yak Master

185 Posts

Posted - 2007-04-18 : 22:29:33
Sorry to bother you guys. I got it working now. Just some network issues.

SKR
Go to Top of Page
   

- Advertisement -