>>--EXEC SQL--SET CONCURRENCY--.-READONLY-.---END-EXEC-->< +-LOCKCC---+ +-OPTCC----+ +-OPTCCVAL-+
READONLY | Specifies read-only cursors. Data cannot be modified. |
LOCKCC | Places an update intent lock on the data page that contains each row as it is fetched. If not inside an open transaction, the locks are released when the next fetch is performed. If inside an open transaction, the locks are released when the transaction is closed. |
OPTCC | Optimistic concurrency control using timestamp or values. Changes to a row through the cursor succeed only if the row remains unchanged since the last fetch. Changes are detected by comparing timestamps or by comparing all non-text, non-image values if timestamps are not available. |
OPTCCVAL | Optimistic concurrency control using values. Changes to a row through the cursor succeed only if the row remains unchanged since the last fetch. Changes are detected by comparing all non-text, non-image values. |
The BEHAVIOR compiler directive option must be set to UNOPTIMIZED.
EXEC SQL SET CONCURRENCY READONLY END-EXEC
Comments:
The SET CONCURRENCY statement is not supported by all ODBC drivers.
You should establish a connection before you use SET CONCURRENCY.
The default is LOCKCC unless:
If you try to set an option which is not supported by the ODBC driver, you will get an error (-19512).