Advantage TDataSet Descendant
Unlocks the given record.
function AdsUnlockRecord( ulRecNum : Longint ) : Boolean;
|
ulRecNum |
Record number to unlock. If 0 (zero), then unlock the current record. |
AdsUnlockRecord releases the server’s lock on the record and flushes any changes in the record to disk. Return value is for success.
Note Unlocking records while in a transaction is illegal.
bSuccess := AdsTable1.AdsLockRecord( 25 );
bSuccess := AdsTable1.AdsLockRecord( 26 );
{. . .your code here. . .}
if ( AdsTable1.AdsIsRecordLocked( 25 )) AND (AdsTable1.AdsIsRecordLocked( 26 )) then
begin
AdsTable1.AdsUnlockRecord( 25 );
AdsTable1.AdsUnlockRecord( 26 );
end;