|
<< Click to Display Table of Contents >> Delphi Examples: DbiIsTableLocked |
![]() ![]()
|
Return the number of locks of type edbiLock aquired on the table passed to the function.
You can obtain table locks by calling the LockTable and UnLockTable methods of the TTable component. This example uses the following input:
LockTotal:= fDbiIsTableLocked(Table1, dbiWRITELOCK);
The function is:
function fDbiIsTableLocked(Tbl: TTable; Lock: DBILockType): Word;
var
NumLocks: Word;
begin
Check(DbiIsTableLocked(Tbl.Handle, Lock, NumLocks));
Result:= NumLocks;
end;