Board index » delphi » Locking records. D5 + Access2000

Locking records. D5 + Access2000


I was hoping to find some information here about locking records in
Access2000. I have a multi-user application and so far all table
operations seem to be going okay. No fancy stuff just simple Ttable and
Tquery's using your every day SQL.

The application is not written using ADO (unfortunatly), and users can
add/update/retrieve and delete records from the GUI. I'm no database
guru and i barely managed to get this DB up and running, so please keep
that in mind here.

Ok here goes.. I've got a few questions about how to implement proper
locking :

- Access 2000 is page-locking right ? meaning if I lock anything I end
up locking not just 1 record but multiple? how many exaclty ?
- I assume that I can use .LOCK method as described in the Delphi Help
allthough the help only mentions Paradox and dBase ? If not, then how
would I be implementing locking ?
- How should I use locking ? at every database-read, or database-write
or just before deleting records ??
- I've read a few posts about locking and it looks to me there are a few
different types of locking, where can i find some information about that

Any pointers to locking records (in general) would be appreciated.

Tamerius Cohen.


Re:Locking records. D5 + Access2000

Access will place locks for you automatically so you should not, under
normal circumstances, need to explicitly place any locks. Access, by
default, uses optimistic page level locking so the lock is not placed until
you actually post the record and it is released as soon as the updated
record has been written to the table. This means that the lock persists for
a very short period of time.

Bill Todd (TeamB)
(Questions received via email cannot be answered.)

Other Threads