How to lock records in DBGrid

How to lock records in DBGrid

Post by Luis Estrad » Tue, 11 Aug 1998 04:00:00

I have an application using Access with VB5 where I've set the
database set to shared and the record sets to pessimistic
locking. Unfortunately when I edit the same record from different
forms no error is produced as if no locking was taking place.

Is there a trick on locking records with DBGrid or how can I detect
this otherwise?


Luis Estrada


1. Not being able to lock records using a dbgrid


   I have an access database which I am accessing through a vbasic

   In order to test the locking of my records I open two instances of a
table in different forms using a DBGrid. My database is opened using
dbPessimistic but I can still edit two records at the same time without
a problem. For both grids I am calling the edit method during
the beforecoledit and try to trap for errors due to locked records.
Unfortunately, no error is being generated as if no locking was

   Am I missing a setting of the database or some weird thing like that?


Luis Estrada

2. DBA Certificate Exam

3. Record Locking - Is there a way to test to see if a record has been locked

4. Relinking Access 97 tables using ADO...

5. DBGrid - before-record, after-record processing?

6. Advice on Unidata

7. How to lock and detect the locked record?

8. Error Interpreter needed

9. how to lock record instead of lock tab?

10. help with record locking.. (Pessimistic locking)

11. Foxbase record locking and being locked

12. ORACLE record locking acting like page locking

13. Locking/Locked records