How to connect ".dbf" file using C#

Posted on 2006-05-23
Last Modified: 2012-05-05
I am very new with this application and i need help from the experts :-),
i want to fill my datagrid with records from my existing .dbf file. but i do not know how.

I have a "emprec.dbf" file located in "c:\database" and i want all the records to be displayed in my datagrid, how should i do it? Can anybody teach me? I will be very much happy if anybody here can help me.

Thanks a lot in advance.
Question by:girlswants_me

    Author Comment

    LVL 28

    Expert Comment

    this is not a chat room. so it might take a few moniutes upto a few hours until someone replies. you should be patient more about it ;)

    you can try to use ODBC. but before I go into detail: what is your experience with C#, with databases, with C# with databases, and about ODBC. I don't want to waste time explaining stuff you already know ;)

    Author Comment

    Consider it, this is my First day, my first time using C#. I am a Delphi developer yesterday :-)

    Author Comment

    By the way, no need to teach me ODBC. Just the C# procedures on how to connect my Datagrid. or some source codes if it is needed.

    Thanks in advance.
    LVL 28

    Accepted Solution

    looking for a connection string I found a MSDN article that might be concise enough:
    and an example connection string: (adapt to C#)
    let me know if you need further help with the odbc (don't forget to mention the provider/manufacturer of the dbf file (is it dbase/foxpro/etec) )

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    728 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

    23 Experts available now in Live!

    Get 1:1 Help Now