Please enable JavaScript to view this site.

ESL Documentation

You can use the SQL Access Module Settings dialog box to view or change the following for the SAM:

Associated database

Description

In general, you should not change the database associated with a SAM while you are creating it in DB/Assist. However, some development situations may require you to build an application using a test version of a database and deliver the production system using a production version of the same database.

DB/Assist compiles all SQL statements in the SAM using the associated database. Therefore, as long as the test and production versions of the database have the identical table and column structure, you can change from one database to another in a single SAM by completing the SQL Access Module Settings dialog box.

If you attempt to open or attach an existing SAM associated with a database that DB/Assist cannot find in the local database catalog, an error message appears. When you select the OK push button in the message box, DB/Assist displays the SQL Access Module Settings dialog box. To continue building this SAM in DB/Assist, you must select an existing database from this dialog box, as described later in this section.

If you do change the database associated with a SAM, be sure to do the following:

Rebind the bind file to the new database. You can do this by selecting SQL Access Module Ø Compile to compile the SAM, or by issuing the BIND command outside DB/Assist. (If you need information about the BIND command, see the IBM's DB2 Documentation.)

In your ESL program, specify the name of the new database in the ESL code that connects to the database.

Changing the Description

You can use the SQL Access Module Settings dialog box to do the following:

View or change a SAMs description.

Supply a description if you did not do so in the New SQL Access Module dialog box when you created the SAM

To view or change the settings for a SAM, follow these steps. This procedure assumes that you have already started DB/Assist as described in Section 1.2.

1.Open the SAM for which you want to change the settings. If you need information about opening an existing SAM, see Opening an Existing SAM.

2.Select SQL Access Module Ø Settings. The SQL Access Module Settings dialog box appears, as shown below. This dialog box displays the database and description currently associated with the SAM

Settings

SQL Access Module Settings Dialog Box

3.If desired, select a new database to be associated with this SAM from the Database drop-down list. The name of the database you selected appears in the Database field.

4.If desired, change or type a new description for the SAM in the Description field. The description can be of any length.

5.Select the OK push button.The SQL Access Module dialog box closes. DB/Assist associates the new database and description with the current SAM.

If you changed the database, DB/Assist disconnects from the current database and connects to the new database. Any subsequent SQL statements built in this SAM will use the new database, and DB/Assist will compile all statements in the SAM using the new database.