|
<< Click to Display Table of Contents >> Delphi Examples: DbiRelTableLock |
![]() ![]()
|
Release all locks placed on a table by DbiAcqTableLock.
Delphi users can use the TTable.UnLockTable method rather than directly calling DbiRelTableLock. This method is defined as: Procedure TTable.UnLockTable(LockType: TLockType); This example uses the following input:
fDbiRelTableLock(Table1, True, dbiWRITELOCK);
The procedure is:
procedure fDbiRelTableLock(TblName: TTable; All: Boolean; Lock: DBILockType);
var
hNewCur: hDbiCur;
begin
Check(DbiGetCursorForTable(TblName.DBHandle,
PChar(TblName.TableName), '', hNewCur));
Check(DbiRelTableLock(hNewCur, All, Lock));
end;
Release all locks on the specified table.
Delphi users can use the TTable.UnlockTable method rather than directly calling DbiRelTableLock. This example uses the following input:
fDbiRelTableLock(Table1);
The procedure is:
procedure fDbiRelTableLock(TblName: TTable);
begin
Check(DbiRelTableLock(TblName.Handle, True, dbiWRITELOCK));
end;