Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create a "dbf" File in SQL Server or C# [duplicate]

I am working with C# .NET and SQL Server 2008 R2, i need get some information from my SQL Server database and export it to a "dbf" file but i am not sure if i can do this by C# .NET or by a SQL server query

like image 358
jorge morera Avatar asked Aug 25 '26 00:08

jorge morera


1 Answers

Excerpt From Connect to a dBASE or Other DBF File on Microsoft :

The SQL Server Import and Export Wizard in SQL Server does not support importing from, or exporting to, dBASE or other DBF files. You can use Microsoft Access or Microsoft Excel to import the data from DBF files into an Access database or Excel spreadsheets, and then use the SQL Server Import and Export Wizard.

From C#, you can use OLE DB Provider and set the Extended Properties to dBASE III, dBASE IV, or dBASE 5.0, as appropriate.

Here is an example of a connection string using Microsoft Jet OLE DB 4.0 drive:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\folder;
Extended Properties=dBASE IV;User ID=Admin;Password=;

Here is an overview what your C# program need to do:

  1. Connect to SQL Server
  2. Extract Data
  3. Open/Create connection to DBase using Ole DB Provider
  4. Write data to the new connection
like image 178
Black Frog Avatar answered Aug 26 '26 15:08

Black Frog



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!