how can I query a dbf file in C#

Posted on 2009-04-27
Last Modified: 2013-12-17
I'm trying to query a dbf file from a C# 3.5 application using ODBC.  The dbf file is part of an event's pro database but I am struggling to get assistance from the original software vendor.  However, I know which file has the required data and can see the records I want using the free application DBF View ( which agree perfectly with Event's Pro.  However when I use the Microsoft FoxPro Dirver for dbf files (version 6.01.8629.01 - dll VFPODBC.dll) it will only connect using free table directory mode and lists totally different data.  Where DBF View gives me dozens of fields the ODBC connection only lists two fields.

I would like to know which is the correct way to connect to dbf files and if there is any reference on the structure of this form of database.  When I look on the disk I see three files and I have a suspicion that the FoxPro driver I am using is not viewing all of these.
Question by:RobYoungManchester
    LVL 14

    Accepted Solution

    Use the VFP OLE DB driver instead of the VFP ODBC driver The ODBC driver corresponds to VFP 6 and is not compatible with the latest database structure.

    Author Comment

    Thanks - that worked perfectly.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now