Attempts to lock the current row.

Syntax

<oRef>.lockRow( )

<oRef>

The rowset in which you want to lock the current row.

Property of

Rowset

Description

An automatic row lock is attempted whenever the value property of a Field object is modified, either directly by assignment, or indirectly through a dataLinked control.

You may use lockRow( ) to attempt an explicit row lock. Whether the lock is automatic or explicit, it will fail if the current row or the entire rowset is already locked.

lockRow( ) returns true to indicate that the lock was successful and false to indicate that it wasn’t.

Row locking support varies among different table types. The Standard (DBF and DB) tables fully support row locking; most SQL servers do not. For servers that do not support true locks, the Borland Database Engine emulates optimistic locking. Any lock request is assumed to succeed. Later, when the actual attempt to change the data occurs, if the data has changed since the lock attempt, an error occurs.