how to link visual fox pro dbf to the MS SQL 2005 in real time

Posted on 2012-09-06
Last Modified: 2012-09-24
Hi Experts,
I have some visual fox pro dbf file which is being used by the users. I need to link the all .dbf file with the MS SQL 2005 to get data in real time and create some new store procedures.
Is there any way?
Please help
Question by:Mehram
    LVL 75

    Accepted Solution

    This is coming really late, but the following process worked for me when trying to query DBF files using only one linked server and ODBC connection.

    Installed Visual FoxPro ODBC drivers on server. (

    Installed Visual FoxPro ODBC bugfix on server. (

    Setup System ODBC connection to point to local directory containing DBF files. I used the "Free Table Directory" option in the setup. Also, I could not get it to work over a share. IMPORTANT: The files had to exist on the server running SQL server.

    Setup a linked server on the SQL server using the following properties:
    Linked server - [Name of linked server]
    Provider - "Microsoft OLE DB Provider for ODBC Drivers"
    Product Name - "Microsoft Visual FoxPro Driver"
    Data Source - [Name of your System ODBC connection]

    After this the following query worked perfectly:
    Select * from OPENQUERY('Select * from {filename}')

    Even better, the following one worked also!
    Select * INTO {TableName} from OPENQUERY('Select * from {filename}')

    As you can see, any filename can be used dynamically within the query, allowing for only one Linked Server and ODBC connection.

    Source :

    Author Comment

    Sir, thanks for the detail help. Is it same way for foxpro 4 dbf?

    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

    Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
    In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    746 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

    14 Experts available now in Live!

    Get 1:1 Help Now