Tim Okrongli
Tim Okrongli

Reputation: 169

Reading from DBF files in C# without a driver

I'm currently writing a C# 4.5 desktop application intended to help troubleshoot an old VPF application. My app is intended to display a list of things that can commonly be broken along with their current status.

A few of the things I need to display are found in the VFP application's databases so I need to be able to read DBase databases. However, I have a few restrictions that make this tricky:

  1. I can't guarantee that any DBF driver has been installed on the system.
  2. My application should run without a separate installer so I can't just toss in the ACE redistributable. (I could install ACE together with the VFP app but I don't want to rely on any part of it being intact, even bundled libraries.)

Is there anything I can bundle with my app that can read VFP databases and doesn't require installation?

Upvotes: 0

Views: 3001

Answers (2)

Cetin Basoz
Cetin Basoz

Reputation: 23867

As Tom said, You can parse DBF files yourself. Their structures are well documented.

As a side note, ACE has nothing to do with VFP database files and actually ACE cannot read/write DBF files (unless they are old DBF formats). Proper VFP database driver is VFPOLEDB which you can include its setup msi with your application. Using VFPOLEDB would be an easy path.

Upvotes: 0

Tom Brothers
Tom Brothers

Reputation: 6017

I wouldn't want to do this... but you could parse the files yourself.

It looks like someone on github has the same idea.

Upvotes: 2

Related Questions