Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,083 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,507 people online right now. Registration is fast and FREE... Join Now!




change dbf file

 
Reply to this topicStart new topic

change dbf file, change dbf file to text file

pyush
16 Apr, 2008 - 10:15 PM
Post #1

New D.I.C Head
*

Joined: 16 Apr, 2008
Posts: 1


how to change dbf file to text file in C#

User is offlineProfile CardPM
+Quote Post

zakary
RE: Change Dbf File
17 Apr, 2008 - 04:23 AM
Post #2

D.I.C Regular
Group Icon

Joined: 15 Feb, 2005
Posts: 404



Thanked: 6 times
Dream Kudos: 175
My Contributions
you will need to learn what DBF compression and format is first, good luck with that I am sure Oracle doesn't just give that information out.
User is offlineProfile CardPM
+Quote Post

atrum_tutela
RE: Change Dbf File
18 Apr, 2008 - 10:14 AM
Post #3

New D.I.C Head
*

Joined: 21 Feb, 2008
Posts: 4



Thanked: 1 times
My Contributions
If the dbf is from a foxpro database you can use :
CODE
OleDbConnection myDb = new OleDbConnection("Provider=VFPOLEDB.1;Data Source=mydatabase.dbc);

You will need to have vfpodbc installed (available here)
Select the fields you need from your dbf and write them to a text file with your method of choice.
It doesnt work well with free tables so you need to have the database container file (.dbc) to point your connection string to. There is supposedly a way to use free tables but I haven't had a chance to play with it.
This page may also be useful. It's a discussion on reading dbf files in C#.

best of luck
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 07:53PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month