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)
 Import Data and Archive

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 Kizer
aka tduggan
Go to Top of Page

supersql
Yak Posting Veteran

99 Posts

Posted - 2006-02-28 : 13:57:48
My DTS has 2 tasks in it. such as
1)Loads an Excel file into sql table
2)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.
Go to Top of Page

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 as
1)Loads an Excel file into sql table
2)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.

Thanks

Karunakaran
Go to Top of Page

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
Go to Top of Page

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?

Thanks

Karunakaran
Go to Top of Page

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.
Go to Top of Page

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.
Go to Top of Page
   

- Advertisement -