WoodyJ007
asked on
Paradox Lock Files...
Hi Guys,
Does anyone know how I can find out how many locks paradox has at any one time?
I think there is a 64 limit or something. I would like to check the count so I can see what portion of some code (rather crap code) is locking more tables.
Cheers
Woody.
Does anyone know how I can find out how many locks paradox has at any one time?
I think there is a 64 limit or something. I would like to check the count so I can see what portion of some code (rather crap code) is locking more tables.
Cheers
Woody.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
about the limt, it depends on the paradoxversion but is about 1024 for one table
ASKER
Just the job.
I was trying to close this yesterday but the EE server was down for ages!
Cheers
Woody.
I was trying to close this yesterday but the EE server was down for ages!
Cheers
Woody.
Return a list of locks acquired on a specific table.
This example uses the following input:
fDbiOpenLockList(Table1, LockList);
The procedure is:
procedure fDbiOpenLockList(Tbl: TTable; var LockList: TStringList);
var
TmpCursor: hdbicur;
Lock: LOCKDesc;
rslt: dbiResult;
begin
Check(DbiOpenLockList(Tbl.
Check(DbiSetToBegin(TmpCur
LockList.Clear;
repeat
rslt:= DbiGetNextRecord(TmpCursor
if (rslt <> DBIERR_EOF) then begin
LockList.Add('Lock Type: ' + IntToStr(Lock.iType));
LockList.Add('User Name: ' + StrPas(Lock.szUserName));
LockList.Add('Net Session: ' + IntToStr (Lock.iNetSession));
LockList.Add('Session: ' + IntToStr (Lock.iSession));
LockList.Add('Record Number: ' + IntToStr (Lock.iRecNum));
end;
until (rslt <> DBIERR_NONE);
Check(DbiCloseCursor(TmpCu
end;