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)
 DTS Package Question.

Author  Topic 

shyamprasad76
Starting Member

38 Posts

Posted - 2001-12-21 : 13:04:34
Hi,

I am trying to export data from SQL server to DBASE.

PROCEDURE THAT I HAVE TO FOLLOW:
--------------------------------

1) I should create a CSV file that contains records as a result of executing an SQL Query.

2) Then i have to call a utility written in dBase/Clipper called IMPDBASE.EXE. The command line syntax will be:

ImpDBase <csvDataFile> <targetDBaseFile> <csvStructureFile>

3) The same thing has to be done everyday.

MY QUESTION:
----------

I am fairly new to DTS packages. Is it possible to run a command line syntax and schedule it to run everyday through DTS Package in SQL server?

Please give me some example and direction to acheive this.

Thanks in advance.

Prasad.


robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-21 : 13:55:39
Yes, you can use the DTSRUN command-line utility for this. This would execute the DTS package you create to export the CSV file. The syntax is detailed in Books Online. Actually, if you create a DTS package and schedule it using Enterprise Manager, it generates the DTSRUN syntax and runs the job in this fashion.

You can also add an Execute Process task to your DTS package to run IMPDBASE.EXE, as long as it is a command-line utility (no user interaction required). Otherwise you can just add it to a batch file along with the DTSRUN command.

Have you tried importing the data directly into the dBase/Clipper file? If the standard drivers don't work, take a look at this site:

http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm

There are links there for 3rd party ODBC drivers, and another link for OLE DB drivers too. You might be able to configure your DTS package to import directly and skip the CSV portion.

Edited by - robvolk on 12/21/2001 14:02:11
Go to Top of Page

shyamprasad76
Starting Member

38 Posts

Posted - 2001-12-21 : 15:28:45
Thanks, Execute process task seems to be a better bet and is startight forward.

Regards,

Prasad.

Go to Top of Page
   

- Advertisement -