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:
- Select Customize from the context menu.
- 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.
- For more information on the individual properties, see the API documentation
for the
java.sql.DatabaseMetaData
interface.
- Once you have completed setting values, select Serialize to...
- Enter a name for the class and the package where you want to place it in
the Repository.
- 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.)
- Display the driver's property sheet.
- 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.
Copyright 2000 Sun Microsystems, Inc.
All Rights Reserved.