Connecting to a Database

There are two ways to open the New connection dialog, which lets you connect Forte for Java to a database.

  1. In the pop-up menu for Databases or for any existing connection, select Add connection.
  2. In the pop-up menu for a driver select Connect using... to preselect the driver.

Enter the following in the Connect using... dialog:

  1. Ensure the correct driver is selected in Driver name.
  2. Provide the JDBC URL for the database connection in the Database URL.
  3. This URL typically begins with jdbc:, followed by a short code name for the driver, followed
    by another colon.

    The rest of the URL depends on the type of driver you are using.
    For example, you might need to specify a host and port; alternatively, the name of a
    database file might suffice, or an ODBC DSN.

    To help you get started, existing drivers are provided with templates for the correct URL format;
    if in doubt, refer to the documentation for the driver you are using.

  4. Provide the User Name and Password, if required by your database configuration.
  5. Click the Remember Password check box to have the IDE remember your password.
  6. Note The password is saved only for the current Forte for Java session;
    after restarting Forte for Java the password must be entered again.
    This feature can be turned on or off in the properties of each connected
    database in the Explorer.
  7. Click OK to connect Forte for Java to the database.
  8. If the connection is successful, a new node appears on the same level as Drivers.
    The icon for a
    connected database shows complete.

If the connection attempt fails, Forte for Java displays a dialog box indicating the connection is broken.

To correct the connection:

  1. Correct the URL in the property sheet.
  2. Connect to the database from the Popup Menu.

To disconnect from the database connection:

Choose Disconnect from the Connection Pop-up menu. You cannot browse
the database until you reconnect to the database using Connect.

 
See also
Connecting to Unsupported Databases  


Legal Notices