Setting database preferences

How to set

The way you set connection-related database preferences in InfoMaker varies, as summarized in the following table.

Database preference

Set in development environment by editing

AutoCommit

Database Profile Setup dialog box for your connection

Lock

Database Profile Setup dialog box for your connection

Shared Database Profiles

Database Preferences property sheet

Connect DB at Startup

Database Preferences property sheet

Connect to Default Profile

Database Preferences property sheet

Read Only

Database Preferences property sheet

Keep Connection Open

Database Preferences property sheet

Use Extended Attributes

Database Preferences property sheet

SQL Terminator Character

Database Preferences property sheet


The following sections give the steps for setting database preferences in the development environment.

For more information

For information about using a specific database preference, see its description in the online Help.

Setting database preferences in the development environment

There are two ways to set database preferences in the InfoMaker development environment on all supported development platforms, depending on the preference you want to set:

  • Set AutoCommit and Lock (Isolation Level) in the Database Profile Setup dialog box for your connection

    ADO.NET

    For ADO.NET, Isolation is a database parameter.

  • Set all other database preferences in the Database Preferences property sheet in the Database painter

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 InfoMaker development environment, you must specify them before you connect to a database. Changes to these preferences after the connection occurs have no effect on the current connection.

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

To 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:

    • Isolation Level

      If your database supports the use of locking and isolation levels, select the isolation level you want to use for this connection from the Isolation Level drop-down list. (The Isolation Level drop-down list contains valid lock values for your interface.)

    • AutoCommit Mode

      The setting of AutoCommit controls whether InfoMaker issues SQL statements outside (True) or inside (False) the scope of a transaction. If your database supports it, select the AutoCommit Mode check box to set AutoCommit to True or clear the AutoCommit Mode check box (the default) to set AutoCommit to False.

      For example, in addition to values for basic connection parameters (Server, Login ID, Password, and Database), the Connection tab page for the following SAP Adaptive Server Enterprise profile named Sales shows nondefault settings for Isolation Level and AutoCommit Mode.

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

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

Setting preferences in the Database Preferences property sheet

To set the following connection-related database preferences, complete the Database Preferences property sheet in the InfoMaker Database painter:

  • Shared Database Profiles

  • Connect to Default Profile

  • Read Only

  • Keep Connection Open

  • Use Extended Attributes

  • SQL Terminator Character

Other database preferences

The Database Preferences property sheet also lets you set other database preferences that affect the behavior of the Database painter itself. For information about the other preferences you can set in the Database Preferences property sheet, see the User's Guide.

To set connection-related preferences in the Database Preferences property sheet:

  1. Open the Database painter.

  2. Select Design>Options from the menu bar.

    The Database Preferences dialog box displays. If necessary, click the General tab to display the General property page.

  3. Specify values for one or more of the connection-related database preferences in the following table.

    Preference

    Description

    For details, see

    Shared Database Profiles

    Specifies the pathname of the file containing the database profiles you want to share. You can type the pathname or click Browse to display it.

    Sharing database profiles

    Connect to Default Profile at Startup

    Specifies when InfoMaker connects to the database. Select or clear the check box as follows:

    • Select the check box

      The next time you start InfoMaker, it automatically connects to the database at startup and stays connected throughout the session until you exit.

    • Clear the check box

      (Default) The next time you start InfoMaker, it connects to the database only when you open a painter requiring a connection.

    Connect DB at Startup in the online Help

    Connect to Default Profile

    Controls whether the Database painter establishes a connection to a database using a default profile when the painter is invoked. If not selected, the Database painter opens without establishing a connection to a database.

    Connect to Default Profile in online Help

    Read Only

    Specifies whether InfoMaker should update the extended attribute system tables and any other tables in your database. Select or clear the Read Only check box as follows:

    • Select the check box

      Does not update the extended attribute system tables or any other tables in your database. You cannot modify (update) information in the extended attribute system tables or any other database tables from the Report and Form painters when the Read Only check box is selected.

    • Clear the check box

      (Default) Updates the extended attribute system tables and any other tables in your database.

    Read Only in the online Help

    Keep Connection Open

    When you connect to a database in PowerBuilder without using a database profile, specifies when PowerBuilder closes the connection. Select or clear the Keep Connection Open check box as follows:

    • Select the check box

      (Default) Stays connected to the database throughout your session and closes the connection when you exit

    • Clear the check box

      Opens the connection only when a painter requests it and closes the connection when you close a painter or finish compiling a script

    PowerBuilder only

    Keep Connection Open has no effect in InfoMaker.

    Keep Connection Open in the online Help

    Use Extended Attributes

    Specifies whether InfoMaker should create and use the extended attribute system tables. Select or clear the Use Extended Attributes check box as follows:

    • Select the check box

      (Default) Creates and uses the extended attribute system tables

    • Clear the check box

      Does not create the extended attribute system tables

    Use Extended Attributes in the online Help

    Columns in Table Display

    Specify the number of table columns to be displayed when InfoMaker displays a table graphically. The default is eight.

     

    SQL Terminator Character

    Specifies the SQL statement terminator character used in the ISQL view in the Database painter in InfoMaker.

    The default terminator character is a semicolon (;). If you are creating stored procedures and triggers in the ISQL view of the database painter, change the terminator character to one that you do not expect to use in the stored procedure or trigger syntax for your DBMS. A good choice is the backquote (`) character.

    SQL Terminator Character in the online Help

    Refresh Table List

    Specify how frequently you want the table list to be refreshed from the database. The default is 30 minutes.

     


  4. Do one of the following:

    • Click Apply to apply the preference settings to the current connection without closing the Database Preferences property sheet.

    • Click OK to apply the preference settings to the current connection and close the Database Preferences property sheet.

    InfoMaker saves your preference settings in the database section of IM.INI.