Data Access User Manual > Data Access and SQL > SQL Tables > Run-Time Options > Auto-Row Locking Mode
 
Auto-Row Locking Mode
The IliSQLTable class has a refreshAndLockRow member function that rereads a given row and attempts to acquire a lock on this row in the database. This is useful if you want to implement the “pessimistic concurrency control policy”.
The IliDataSource class has “auto-row locking” mode in which it automatically calls the refreshAndLockRow member function of the underlying table whenever the end user starts modifying the current row.
Here is how the “auto-row locking” mode can be enabled:
IliSQLDataSource* sqlDs;
...
sqlDs->enableAutoRowLocking(IlvTrue);
Note: When using an Oracle database system, it is possible to request that the refreshAndLockRow member function includes the “NOWAIT” clause in the SQL SELECT statement it uses to lock the row. By doing this, the end user will not wait when locks are held by other database users. See the enableNoWaitOnLockRow member function for more information.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.