Progress
DataServer
for ODBC Guide


Data Source Record Locking

In a DataServer application, an ODBC data source handles all of its own locking issues. The Progress 4GL locking rules do not apply when you access information from an ODBC data source.

Table 2–7 provides data-source-specific comparisons.

Table 2–7: Progress and Data-source Locking
Progress
Data Source
NO–LOCK
Can support the NO–LOCK option in a manner consistent with Progress when transaction isolation levels are set properly.1,2
SHARE–LOCK
May support shared locks at the table, page, and record level. However, the scope and duration of Progress and data-source shared locks may differ depending on how data source cursors behave at a transaction boundary and how isolation levels are set. For more information, see your data source documentation.
EXCLUSIVE–LOCK
Can support exclusive locks at the table, page, and/or record level, depending on the data source.
  1. DB2 does not support an equivalent lock type. In a DB2 application, the Progress NO–LOCK condition option is the equivalent of a Progress SHARE–LOCK option. As a result, you might receive the message “record locked.”
  2. Sybase and Microsoft SQL Server 6.5 support the NO–LOCK option in a manner consistent with Progress except for indexed columns. Record-level locking remains in effect when you access indexed columns.

Each data source uses locks or optimistic concurrency control automatically to isolate users from each other in a multi-user configuration. Your data source and ODBC driver may provide one or a number of transaction isolation levels. In a multi-user configuration, you can isolate users from each other in your data source by setting the isolation level (if the ODBC driver permits). In your Progress schema holder, use the -Dsrv TXN_ISOLATION,n connection parameter (where n = 1, 2, 4, or 8) to set the isolation level in ODBC. See the Microsoft ODBC Programmer’s Reference for more information and the reference manuals provided by your data source vendor for supported isolation levels.

NOTE: Certain earlier versions of DB2, Sybase, and Microsoft SQL Server 6.5 use page-level locking rather than record-level locking. This can affect data access when two or more users attempt to read or update different records that are on the same page. See your data-source documentation for details.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095