Advantage TDataSet Descendant
Retrieves the total number of records locked by the current user on the given table.
function AdsGetNumLocks : Longint;
AdsGetNumLocks returns 0 (zero) if the table is file locked. The number of locks returned includes implicit locks. The number does not include locks held by other users or other applications.
AdsTable1.Edit;
lLockCount := AdsTable1.AdsGetNumLocks;
{ lLockCount equals 1 because any record in Edit state is locked }