Solved

Paradox Lock Files...

Posted on 2001-06-25
4
382 Views
Last Modified: 2007-12-19
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.
0
Comment
Question by:WoodyJ007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6224482
just found this, at borland, and somewhere i have a sample too

BDE API Examples (DbiOpenLockList)
Creates an in-memory table containing a list of locks acquired on the table.
--------------------------------------------------------------------------------

Return a list of locks acquired on a specific table:

This example is included with Delphi in the BDE32.HLP file.


meikl ;-)
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6224724
from the mentioned helpfile, don't forget to add the bde-unit into the uses clause

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.handle, True, True, TmpCursor));
  Check(DbiSetToBegin(TmpCursor));
  LockList.Clear;
  repeat
    rslt:= DbiGetNextRecord(TmpCursor, dbiNOLOCK, @Lock, nil);
    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(TmpCursor));
end;
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6225390
about the limt, it depends on the paradoxversion but is about 1024 for one table
0
 

Author Comment

by:WoodyJ007
ID: 6226759
Just the job.

I was trying to close this yesterday but the EE server was down for ages!

Cheers
Woody.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 90
select query - oracle 16 103
How to convert memory stream to PDF file 6 216
Graphics32 under Delphi 10.1 Berlin 2 172
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question