Use a Database Wizard to (optionally) create and define a Data Source; create and define a Database Schema; and create a Database Adapter in a single series of steps. (In lieu of creating three objects separately.)
- Select File | New | Database Wizard from the main menu bar.
Note: If you select the package in which the Adapter should reside before creating it, some parameters are automatically populated in the New Database Objects window.
- The New Database Objects window appears. Provide the Source folder, Package, and (Name) Prefix.
- Click Next. The Data Source panel appears.
- If you want to use an existing Data Source, choose the Select Existing Data Source radio button.
- Click the Select Data Source button to populate the Database Source Field and skip to Step 5.
-
If you want to create a new Data Source, choose the Create New Data Source radio button. Perform these substeps:
- Under JDBC Driver, in the Classpath field, click the Add button to specify the path to your database. Either:
- Click the Browse button to locate the database
- Click the Global Variable button to select a Global Variable.
- Click in the Driver Name field to specify the driver to use to connect to the database.
Click Next.
- The Database Connection panel appears. Under Connection Information, in the URL field, either:
- Type the database's URL.
- Click the Global Variable button to select a Global Variable.
- In the Username field, either:
- Type the username needed to access the database.
- Click the Global Variable button to select a Global Variable.
- In the password parameter, type the password needed to access the database.
- If your database uses/supports catalogs, specify one in the Catalog parameter.
Note: Both catalog and schema support varies depending on database. If your database does not use/support them, just leave the fields blank.
- Under JDBC Driver, in the Classpath field, click the Add button to specify the path to your database. Either:
- Click Next. The Database Metadata panel appears.
- In the Default Schema field, specify the schema that holds the tables you want to access.
Note: This field refers to the schema that your database uses. It does not refer to a Schema object.
If you do not want to specify a schema, you must create the Data Source outside the Wizard.
- Under Tables, select the tables you want to access. If you need to refresh the list of tables, click the Refresh tables found in schema button.
- In the Default Schema field, specify the schema that holds the tables you want to access.
- Click Next. The Table Bindings panel appears. Drag tables from the Database Metadata area to the Database Schema area to create parent-child relationships. If you need to remove a table from the Database Schema area, click on the table to select it and click the Delete button.
- Click Finish. Notice in the Project Explorer, the new database objects appear. The new Database Adapter's editor is open. It now must be defined.
Comments
0 comments
Please sign in to leave a comment.