exporting a dataset or dataview to a dbf file

G

Guest

Hi!

I'm using visual studio .net 2003, creating a windowsapplication. I'm also
using a SQL server for storing and retrieving data.

Is it possible for me, using the application, to create a dbf file and store
data from a dataset or a dataview in this file? And if so how?

greatful for any help.

Best regards
Hans Årsjö
 
C

Cindy Winegarden

Hi Hans,

You can create a FoxPro DBF using standard SQL DDL.

Create Table MyTable (cField C(10), iField I, nField N(10, 2), dField D)
Insert Into MyTable (cField, iField, nField, dField) Values ("One", 1, 1.00,
{01/01/2001})


You can also create a linked server in SQL Server and insert data that way.
Use the latest FoxPro and Visual FoxPro OLE DB data provider, downloadable
from http://msdn.microsoft.com/vfoxpro/downloads/updates .

sp_addlinkedserver 'MyLinkedServer', 'Description', 'VfpOleDb.1',
'C:\MyPath\'
Select * From MyLinkedServer...MyTable
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top