Setting AutoCommit and Lock in the database profile

The AutoCommit and Lock (Isolation Level) preferences are properties of the default Transaction object, SQLCA. For AutoCommit and Lock to take effect in the PocketBuilder development environment, you must specify them before you connect to a database. Changes made to these preferences after the connection occurs have no effect on the current connection.

To set AutoCommit and Lock before PocketBuilder connects to your database, you specify their values in the Database Profile Setup dialog box for your connection.

StepsTo set AutoCommit and Lock (Isolation Level) in a database profile:

  1. Display the Database Profiles dialog box.

  2. Click the plus sign (+) to the left of the interface you are using, or double-click the interface name.

    The list expands to display the database profiles defined for your interface.

  3. Select the name of the profile you want and click Edit.

    The Database Profile Setup dialog box for the selected profile displays.

  4. On the Connection tab page, supply values for one or both of the following:

    Figure 18-1: Connection page showing Isolation Level settings

    Shown is the Database Profile Setup dialog box for an O D B C connection. A drop-down list is displayed with all of the Isolation Level options. The selected option is Default Driver Behavior. Other possible Isolation Level options are Read Committed, Read Uncommitted, Repeatable Read, Serializable Transactions, and Transaction Versioning.
  5. (Optional) Click the Preview tab if you want to see the PowerScript connection syntax generated for Lock and AutoCommit.

    PocketBuilder generates correct PowerScript connection syntax for each option you set in the Database Profile Setup dialog box. You can copy this syntax directly into a PocketBuilder application script.

    For instructions, see “Copying DBParm syntax from the Preview tab”.

  6. Click OK to close the Database Profile Setup dialog box.

    PocketBuilder saves your settings in the database profile entry in the registry.