How Do I...

Setting an update policy

Setting a fetch policy Tip: Use Auto commit No example for this topic Setting an update policy

Use the Update pages of the Multi-row Query Settings window to set the update policy of a query. The settings on this page determine the following:

The page has the following options:

Update Options - Page 1 of 2

Page 1 has the following update options:

Read only
Prohibits updates to the query result table. When you select this setting, the remaining options on the page are disabled.

Defer updates
Determines when changes made to a result table are applied to the database. When you select this setting, VisualAge holds all changes to the result table until the user performs a specific action (such as selecting a push button) to apply or cancel them. After the user applies the changes, VisualAge then obtains a lock on any rows that changed. Also, when you select this setting, the Lock row on edit option is disabled.

When this setting is not selected, all changes are applied to the database immediately. They are not committed, however, unless you enable the Auto commit option.

Lock row on edit
Obtains a lock on the row being edited so that no other users can edit it.

VisualAge obtains locks by opening a cursor on the row. When a different row is edited, the previous row is updated if it has changed. Changing to a different row causes an update lock and the cursor is closed.

Auto commit
Commits all changes to the result table without requiring the user to perform a specific action. The effect of this option varies according to the Defer updates setting:

Update Options - Page 2 of 2

Page 2 has the following update options:

Columns to Update
Displays all columns to be returned in the result table and enables you to select the columns that the user can update.

Columns to use as index
Displays all columns to be returned in the result table and enables you to select the columns to use as index. These are the columns used to lock the row. The columns you select must uniquely identify a row.

Available
Displays a list of all indexes available in the database and enables you to select one to use as an update index.

To save the settings of your multi-row query part, select OK.


[ Top of Page | Previous Page | Next Page | Table of Contents ]