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
 Import/Export (DTS) and Replication (2000)
 Help!!! DTS : Execute Process Task properties

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-07-06 : 11:55:49
Shawn writes "I am trying to execute a batch file using the "Execute Process Task" in dts. These batch file is meant to populate some tables in another database. I specified the location in the "Win32 process" and it gives me an error if I leave the "Return code" = 0, I changed this to 1 and I get the success message but still does not run the .bat file for some reasons - no data is imported. Any ideas? I have searched around but to no avail."

vsrajan76
Starting Member

10 Posts

Posted - 2004-07-08 : 17:31:21
Try creating the store Procedure like this and call that in ur program and see, if it works. This will also give you the return code you are getting for your command statement.

CREATE procedure ExecBATFile
@Cmd varchar(255),
@ret as int output
AS
set nocount on
exec @ret = master.dbo.xp_cmdshell @Cmd
GO

Hope this helps!!!

-Sundar
Go to Top of Page
   

- Advertisement -