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.
| 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 outputASset nocount onexec @ret = master.dbo.xp_cmdshell @CmdGOHope this helps!!!-Sundar |
 |
|
|
|
|
|