PreviousTutorials and Guide to Samples (9.1 revision 1) Next

Lesson 2: Linking to Tables

Show this topic in Library frames

Microsoft Access recognizes Pervasive databases and their components through ODBC. One way to view and manipulate Pervasive data through Access is to create a linked table. When you create a linked table, the data remains in its current location and format. Linking gives you access to the live data, and other applications can continue to view and update the data.

This lesson links to each table in the sample database.

To create linked tables to the sample database:

  1. In Access 2000 follow these instructions: In the Demodata:Database window, right-click on Tables and choose Link. Skip to step 3.
  2. In Access 97, follow these instructions: In the Demodata:Database window, on the Tables tab, click New. Proceed to the next step.

  3. In the New Table dialog box, highlight Link Table and click OK.


  4. In the Link dialog box, select ODBC Databases in the Files of type field at the bottom of the dialog box.


  5. In the Select Data Source dialog box, go to the Machine Data Source tab, highlight the Demodata data source, and click OK.



  6. Note
    Choosing a data source from the Machine Data Source tab is very important. If you mistakenly choose a data source from the File Data Source tab, results are unpredictable.
  7. In the Link Tables dialog box, click Select All and then OK.


  8. Access creates linked tables for all the existing tables in the Pervasive sample database.



    You can view and manipulate data in these tables just as you would any other Access table. You can insert rows and update data in the tables. Also, you can change the way the fields appear in Access; however, Access does not allow you to change the way the linked table and its fields are defined in the source database. Doing so would require changing the DDFs; such operations are possible only through SQL Pass-Through Queries, which are discussed in "Lesson 4: Creating a SQL Pass-Through Query" on page 2-16.

    Note that if you use the ODBC Administrator to change the data source configuration in any way, you must relink the tables.

    Also, note that Access's underlying Jet engine has some limitations when connecting to data through ODBC. For more information, refer to Microsoft's Tech Notes Q128809 and Q127096.


Chapter contents
Publication contents

Prev topic: Lesson 1: Setting Up Your Environment
Next topic: Lesson 3: Importing Tables