Using a Database Adaptor to Replace Missing Metadata

Forte for Java's Database Explorer module provides a way for you to set up a database adaptor class
when the database metadata is not sufficient for a successful connection. When there is a database
metadata failure, you can use this class to set values for Boolean, integer, and string properties and
to specify an SQL query to obtain correct values for other methods (for example, getTables).

To create a database adaptor class:

  1. Select Customize from the context menu.
  2. Set any properties not properly supported by the driver vendor in the customization dialog that opens.
    Forte for Java obtains values for the other properties from the driver.
  3. For more information on the individual properties, see the API documentation for the java.sql.DatabaseMetaData interface.
  4. Once you have completed setting values, select Serialize to...
  5. Enter a name for the class and the package where you want to place it in the Repository.
  6. Switch to the Runtime tab in the Explorer and select the driver you want to use under Databases/Drivers.
    (If no driver is installed, see Adding a New Driver for information on installing one.)
  7. Display the driver's property sheet.
  8. For the Adaptor class property, enter the path and name of the the serialized file you just created.

Once you connect to the database, the property sheet values for the connection must correspond
to the values set in the adaptor class.

 
See also
Connecting to a Database


Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.