Exporting From SQL Server to DBF File through VB Code

10-17-2004, 01:22 PM

I would like to export data from a SQL Server table to .DBF File.
I tried the Following Code

con.Execute "SELECT * INTO [dBase IV;DATABASE=C:\Test].[testb] FROM [Authors]"

Con is ADO connection to an SQL Server.Pubs database is used for test purpose.

But it doesnt work and comes out with message saying 'specifying owner does not exists' etc.I just have a C:\Test directory.

However similar code works fine when the connection is to an Access database .The .dbf file is properly created.

Can some one point out if there is something wroing in this quey or give me an alternative way of exporting SQL table to .dbf file.

Thanx in advance

10-17-2004, 06:06 PM
You are trying to mix database providers here. SQL Server does not use the Jet Provider, and it appears you are trying to send data from SQL Server to a dbase table via this provider.

Instead, just use the DTS. The DTS was designed to import and export data from SQL Server. For a good overview of the dts, you can start here:


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum