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 |
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-02-28 : 11:47:59
|
I am trying to import an excel file and archive the imported files. Importing data is running OK but when i am trying to archive using a .bat file it give an error saying "CreateProcessTask 'DTS Task_DTSCreateProcessTask_2': Process return code 1, which does not match the specified SuccessReturnCOde of 0"when i run tht .bat file out of the DTS task it runs fine but when i run it all together with my task it fails.Do i need to change the return code to 1 in my Execute Process Task, though i do tht, it doesnt show error but its not performing wht it has to. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-02-28 : 13:54:27
|
We do not have enough information to help you. You'll need to explain what the DTS package and the .bat file do. We can't see your system, so you need to provide as much information as possible for us to hlep.Tara Kizeraka tduggan |
 |
|
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-02-28 : 13:57:48
|
My DTS has 2 tasks in it. such as1)Loads an Excel file into sql table2)Execute Process Task:- Move the Excel file to another folder and then rename it(rename.bat).1st task runs fine but 2nd gives the error. |
 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-28 : 22:40:24
|
quote: Originally posted by supersql My DTS has 2 tasks in it. such as1)Loads an Excel file into sql table2)Execute Process Task:- Move the Excel file to another folder and then rename it(rename.bat).1st task runs fine but 2nd gives the error.
The folder you are trying to move the excel file has permissions or try sharing the folder. ThanksKarunakaran |
 |
|
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-03-01 : 07:31:25
|
Everything works fine when I run the .bat file directly in DOS but it fails when I run that from DTS |
 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-03-01 : 09:42:58
|
quote: Originally posted by supersql Everything works fine when I run the .bat file directly in DOS but it fails when I run that from DTS
Maybe because the context of user executing during the dos mode and the context of DTS executing it.Is it a scheduled process?ThanksKarunakaran |
 |
|
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-03-01 : 15:47:25
|
what do u mean by context, I really didnt get what your are trying to convey me. |
 |
|
Yukon2005
Starting Member
8 Posts |
Posted - 2006-03-07 : 05:19:31
|
Try using a ActiveX script just to see the result!Option Explicit Function Main() dim oFso set oFso = CreateObject("Scripting.FileSystemObject") oFso.MoveFile "{Current Full Path E.g. C:\file.txt}", "{folder location} E.g. C:\backup\"End Function Maybe this will raise a better error. |
 |
|
|
|
|