Connecting to DP4 from Microsoft Access

In Microsoft Access, the linked table facility creates an ODBC link from an Access database to a DP4 data source so that you can view and edit data in the table. You can continue to use linked tables in both DP4 and in Microsoft Access.

After you link a table, you can set some field properties in the table's Design view. Although you can't change the structure of a linked DP4 table, you can set the following field properties: Format, DecimalPlaces, InputMask and Caption. You can't set the ValidationRule, ValidationText and DefaultValue properties for the table, but you can set those properties in a form bound to the attached table.

You will need to set the Format property of DP4 Yes/No fields because the Yes value is normally displayed as -1 and the No value as 0. You can choose to output Yes/No fields with "True/False", "Yes/No" or "On/Off" values.

If you rename a linked table in DP4, you can update the connection in Microsoft Access with the Linked Table Manager (if it works at all!).

In Microsoft Access, to link tables:

  1. Open an existing Access database or create a new one
  2. Select Get External Data and then Link Tables... from the File menu. The Link dialog appears.
  3. In File of Type Combo Box, select ODBC Databases and click Link. The ODBC Data Sources dialog appears.
  4. Select the DP4 data source you want to use, for example SALESORD, and click OK. The Link Tables dialog appears. It lists all the application tables on the DP4 data source.
  5. Select tables by highlighting one and clicking Link
  6. When you are finished linking tables, select Close. You are returned to the Database window where the linked tables are listed.

With certain restrictions, most of which have already been discussed, you can use the linked tables as if they were ordinary Microsoft Access database tables. Please note that the names for fields will not be the same as when you are using other products. The correct names to use will normally be shown as the column headings. Refer to the information on ODBC name mangling for further details. If attempting to manipulate date or time fields please refer to the note about Access on the SQL Notation page.

If you are using Microsoft Access 2000, you may experience problems connecting to DP4. This is a bug in Microsoft Access, not DP4. You should visit the Microsoft Web Site, or MSDN and download and install the latest version of MDAC, which will probably cure the problem. It may also be worth downloading the Microsoft Jet ODBC drivers which are not included with MDAC any more.