Using a Database Adaptor to Replace Missing Metadata

The Database Explorer 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. From the Runtime tab in the Explorer, expand the Databases, and expand the Adaptors node.
  2. Right-click the DefaultAdaptor node and choose Customize Bean from the contextual menu.
  3. In the customizer dialog box, set any properties not properly supported by the driver vendor.

    The IDE 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.

  4. Click Serialize As.
  5. In the Serialize As dialog box, type a name for the class and the package where you want to place it in the filesystem and click OK.
  6. In the Runtime tab, expand the Drivers node (under the Databases node) and select the driver you want.

    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, type the path and name of the the serialized file you just created.
tip 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

Legal Notices