Optimistic Lock: No Error Adding New Record 
Author Message
 Optimistic Lock: No Error Adding New Record

Will I have to abandon MDB files for DBF files in multi-user setting (arrrrrrrrrgh!)?

We manage a multi-user Access 2.0 database with a VB 3.0 front-end and use pessimistic record
locking to avoid having two users edit the same record simultaneously. This works just fine when
users edit records, but when a user adds a new record, it sometimes does not get saved, and no
trappable error occurs. This seems to happen if the last page in the database is locked when a
the other user is editing one of the last record in the db. What can I do?

The controls are all unbound. When the user clicks on the update button, a BeginTrans is issued,
followed by an AddNew, data is copied to record, and then and Update and CommitTrans are issued.
NONE of these will return an error when the record is not added?!!! At least MS-Access detects
that, and my Access Basic codes says: "Record Not Updated". I have to read back the record in
the db after the CommitTrans to find out if it has been written... Scary!

Thanks.

--------------------
 Michel Marinier



Thu, 25 Sep 1997 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Add a new item also locked with optimistic locking

2. Optimistic Record locking (networked Database)

3. Optimistic Locking and Write Conflict Errors

4. Re : Error 3186 on Optimistic Locking

5. Error 3186 on Optimistic Locking

6. adding new records & new record

7. record locking while insert new record??

8. Weird ASP error when trying to add a new record to a MS Access database

9. ADO and SQL Server error adding new record

10. Error while Adding New Records

11. deleting records in a table and then adding new records

12. Optimistic Locking in VB with Stored procedures

 

 
Powered by phpBB® Forum Software