PATH  WebObjects 4.0 Documentation > Post-Install Guide

Table of Contents Previous Section

Using Microsoft Access

Read this section if you want to use Enterprise Objects Framework to connect to a Microsoft Access database. The information in this section describes what you need to do before you can install the sample databases or create your own custom databases.

What You Need

Enterprise Objects Framework uses ODBC (a standard API developed by Microsoft for accessing database management systems) to interact with Access databases, so you'll need an Access-specific ODBC driver if you don't have one already.

To determine if you've already got an ODBC driver installed, open the Control panel. If there isn't an ODBC option listed, then you don't have any ODBC drivers installed. The latest ODBC manager and drivers for Windows NT are available from Microsoft. See http://www.microsoft.com/data/mdac15.htm .

Some bugs in old versions of the ODBCJT32.DLL (used by the Enterprise Objects Framework to communicate with Microsoft Access) can cause problems with primary key generation in the ODBC Adaptor (the ODBC manager reports an invalid SQL statement when updating the EO_PK_TABLE). ODBCJT32.DLL version 3.40.2728 causes this problem, but the more recent ODBCJT32.DLL version 3.51.1029 works correctly. To verify that you don't have the older version of the ODBC drivers, open the ODBC Control Panel and click on the tab labeled "ODBC Drivers".

Creating Data Sources and Databases

After you've installed an ODBC driver for Access, you'll need to create databases and corresponding data sources for them. A data source simply stores the information needed to connect to your database. The easiest way to create an Access database and a corresponding data source from scratch is to create them both at the same time with the ODBC Data Source Administrator:

  1. Choose the ODBC option in the Control Panel.
  2. An ODBC Data Source Administrator panel opens.

  3. Click the System DSN tab.
  4. System data sources are accessible to all users, including NT services. It's important to create system data sources instead of user data sources, especially for use with WebObjects, because autolaunched applications aren't able to access user data sources.

  5. Click Add.
  6. The Create New Data Source panel opens.

  7. Select the Microsoft Access Driver.
  8. Click Finish.
  9. The ODBC Microsoft Access 97 Setup panel opens.

  10. Type a name for your data source in the Data Source Name field (Movies, for example).
  11. Remember the name you provide because later you'll it to login to your database.

  12. In the Database section of the panel, click Create.
  13. A New Database panel opens. You'll use this panel to create a new, empty database.

  14. Type a name for your database in the Database Name field (Movies.mdb, for example).
  15. Choose a directory where you want the database located.
  16. Click OK.
  17. A panel opens telling you that the database was successfully created.

  18. In the ODBC Microsoft Access 97 Setup panel, click OK.

Your database and data source are now ready to use. If you want to populate the new database with one of the sample databases that come with WebObjects, you've completed the first step: setting up the database accounts. To find out what to do next, see "Setting Up the Sample Databases ."

Table of Contents Next Section