How to use Visual FoxPro DBC files in Access 2002 (286815)
The information in this article applies to:
This article was previously published under Q286815 Moderate: Requires basic macro, coding, and interoperability
skills. This article applies only to a Microsoft Access database (.mdb).
For a Microsoft Access 97 version of this article, see 176568.
For a Microsoft Access 2000 version of this article,
see
197893. IN THIS TASKSUMMARY 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.
back to the top
Part 1: Creating the Data Source in Control Panel 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. - Click Start, point to Settings, and then click Control Panel.
- In Control Panel, double-click the ODBC Data Sources (32bit) icon to start the ODBC Data Source Administrator.
- In the ODBC Data Source Administrator, click the User DSN tab, and then click Add.
- In the Create New Data Source dialog box, click the Microsoft Visual FoxPro driver, and then click Finish.
- 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.
- In the Description box, type a description, for example, Visual FoxPro User DSN.
- Under Database type, click Visual FoxPro database (DBC).
- 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.
back to the top
Part 2: Linking a Visual FoxPro Table For an example of how to import or link Visual FoxPro tables in a
Visual FoxPro database to an Access database, follow these steps:
- Start Microsoft Access.
- Open any database.
- On the File menu, point to Get External Data, and then click Link Tables.
- In the Link dialog box, click the arrow in the Files of type box, and then click ODBC Databases() in the list.
- 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.
- 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.
back to the top
REFERENCES 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:
back to the top
Modification Type: | Major | Last Reviewed: | 8/13/2004 |
---|
Keywords: | kbHOWTOmaster KB286815 kbAudITPro |
---|
|