Try OpenEdge Now
skip to main content
Managed Adapters Guide
Database Managed Adapter : Tutorial 1: Using the Database Adapter : Step 7: Configuring the Database Adapter
 

Step 7: Configuring the Database Adapter

To configure the database adapter:
1. From the Properties view of the Query workstep, click the Configuration tab and then click Configure. The Database Adapter Configurator dialog box appears.
The Database Adapter can execute a number of SQL statements in sequence, and each statement may connect to a different database.
2. Click Add to add a new statement. The SQL Statement dialog box appears.
Note that the Database Parameters details are blank, as the database connection is not yet configured.
a. Click Choose a Database. The Database Definitions dialog box appears.
You can define a new database connection.
b. Click the Add button. The Database Parameters dialog box appears.
c. Enter the appropriate values for your configuration. Note that, for this demonstration, jdbc.SBMCommonDB is used as the datasource. However, in practice, you need to define your datasource with your own connection pool.
The database name must be same as the value of the db0.name parameter in the OEBPS_HOME\adapters\db\conf\db.properties file. The default value of this parameter is oebps. If you want to change it, then update the db.properties file appropriately before specifying it in the Database Parameters dialog box.
d. Click OK. The Database Definitions dialog box shows the SampleDatabase.
e. Select SampleDatabase, and click OK. The SQL Statement dialog box now displays the parameters for the selected database.
3. Click Connect. After a short delay, the Status pane shows the message: "Successfully connected to database: SampleDatabase".
In case of errors, refer to the error messages in the Status pane. We recommend that if an error occurs, check that:
*You entered all the connection parameters correctly.
*The database server is running and accessible.
*The database drivers are in the correct place.
Note: You need to define the database connection only once. For future use, you only need to select the existing connection from the Database Definitions list.