Advantage TDataSet Descendant
Tests if the given table is locked by the current user.
function AdsIsTableLocked : Boolean;
AdsIsTableLocked will return True if the table is locked by the current user for this TAdsTable instance. If the table is locked by another user or by this user who is using a different TAdsTable instance, AdsIsTableLocked will return False. If the table is opened exclusively by the current user, this function will return False.
bSuccess := AdsTable1.AdsLockTable;
{. . .your code here. . .}
bIsLocked := AdsTable1.AdsIsTableLocked;
if ( bIsLocked ) then
AdsTable1.AdsUnlockTable;