Skip to content

Dummy_Update_Column

The column for which a "dummy update" is done when finding records inside a transaction for a back end that supports SQLSetPos for locking.

Supported By

  • DataFlex ODBC Driver

Value

  • 1 – number of columns in the table

Associated Attribute

  • DF_FILE_DUMMY_UPDATE_COLUMN

Remarks

Desktop databases usually do not support positioned updates. In these cases, a different update mechanism called SQLSetPos, which allows for records to be locked, is used. If the back end does not support exclusive locks on records, the driver will perform a “dummy update” to lock the record. This mechanism ensures that records are locked when they are found while in a transaction. Since most ODBC drivers do not support table locking, there is a difference between DataFlex locking and ODBC locking.

The dummy update mechanism updates a record (without changing any field value) directly after it has been found. The record identity column is set to the value just obtained from the find. This happens in the find logic. If the record identity column is not "updatable" (it could be an auto-increment, for example), you can set up an alternative column by using the intermediate file keyword DUMMY_UPDATE_COLUMN. The Dummy_Update_Column keyword should be set to the number of the column you want to "dummy update". Column numbers start at 1.

At this moment, there is no facility to determine how the back end in use supports locking. There are several ways this can be done depending on the back end in use. Possible behaviors are:

  • Positioned updates: (no longer used in driver revisions 5 or higher). If the back end supports positioned updates, locking records is supported, and no dummy updates are required.

  • SQLSetPos + exclusive lock: Some back ends support the SQLSetPos logic with the possibility to lock a record exclusively. No dummy updates are required.

  • SQLSetPos + dummy update: If the back end does not support exclusive locks on records, a dummy update will be done directly after a record has been found while in a transaction. In this case, the DUMMY_UPDATE_COLUMN intermediate file setting is used to determine the column to use in the dummy update operation.

  • None: Some back ends are read-only and do not support locking at all.

See Transactions for more information on locking and transactions.

See Also