This article was previously published under Q286815
On This Page
SUMMARY
This article describes how to access data in a Microsoft
Visual FoxPro database (.dbc file) from Microsoft Access 2002.
This
article is divided into two parts. The first part explains how to set up a data
source that points to a Visual FoxPro database. The second part explains how to
import or link tables from a Visual FoxPro database into an Access 2002
database.
To create a Data Source Name (DSN) that points to a Visual FoxPro
database, follow these steps.
NOTE: Because there are several versions of Microsoft Windows, the
following steps may be different on your computer. If they are, see your
product documentation to complete these steps.
1.
Click Start, point to Settings, and then click Control Panel.
2.
In Control Panel, double-click the ODBC Data Sources (32bit) icon to start the ODBC Data Source Administrator.
3.
In the ODBC Data Source Administrator, click the User DSN tab, and then click Add.
4.
In the Create New Data Source dialog box, click the Microsoft Visual FoxPro driver, and then click Finish.
5.
In the ODBC Visual FoxPro Setup dialog box, in the Data Source Name box, type a name for your new data source, for example, useVFP.
6.
In the Description box, type a description, for example, Visual FoxPro User DSN.
7.
Under Database type, click Visual FoxPro database (DBC).
8.
In the Path box, type the path to your .dbc file, or click Browse to locate the file, and then click OK. The data source is created.
For an example of how to import or link Visual FoxPro tables in a
Visual FoxPro database to an Access database, follow these steps:
1.
Start Microsoft Access.
2.
Open any database.
3.
On the File menu, point to Get External Data, and then click Link Tables.
4.
In the Link dialog box, click the arrow in the Files of type box, and then click ODBC Databases() in the list.
5.
In the Select Data Source dialog box, click the Machine Data Source tab, select the Visual FoxPro DSN that you created in Part 1 of
this article, and then click OK.
6.
In the Link Tables dialog box, select a Visual FoxPro table, and then click OK. If you are prompted by a Select Unique Record
Identifier dialog box, select the field or fields that uniquely identify
each record, and then click OK. The Visual FoxPro table is then linked to your Access 2002
database.
The latest Microsoft Visual FoxPro ODBC driver is available
in the Microsoft Data Access Components (MDAC) package, which you can download
from the following Microsoft Web site:
Need More Help? Contact a Support professional by Email, Online or Phone.
Customer Service For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
Newsgroups Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.