Hi everybody,
I have built a very small split-DB app to test out the locking behavior of Access 2K under ADO. I have a backend DB that has only a single table. My frontend has one module with a procedure that opens an ADO recordset against the backend table, and attempts an edit to an existing record. I left the BE DB on the file server and put the FE on the local drives of two machines so that I could run it locally on both at once. Then I can step through the procedure on each machine to control execution timing and study the locking behavior.
The unexpected result, however, is that (in certain cases -- see below) as soon as one machine has a recordset open against the table, the other machine is unable to open a recordset against the same table. This is regardless of whether the first machine has begun any edits to the recordset. I didn't expect to see any conflicts in opening the recordsets -- I only expected conflicts when one machine had a record locked for editing and the other then tried to edit that same record.
Here's an important complication: one machine is running the full version of Access, but the other is running the Access Runtime. I only have this problem when the Full Version opens the recordset first, and then the Runtime tries to get a recordset open. It fails and raises this error: "Disk or network error" (#-2147467259). If the Runtime opens the recordset first, the Full Version seems to have no trouble opening a recordset and I can observe the expected behavior.
Does anybody know what's going on here? The implication is that if one of my users is editing a record, other users may be unable to even view data anywhere in the table. Does Access lock the entire table?
Thanks in advance for any help!
P.S. If you're wondering how I "step through" the code in the Runtime environment, I'm not using the VBE's debugging features -- I just put calls to MsgBox() between every line of code in the procedure.
I have built a very small split-DB app to test out the locking behavior of Access 2K under ADO. I have a backend DB that has only a single table. My frontend has one module with a procedure that opens an ADO recordset against the backend table, and attempts an edit to an existing record. I left the BE DB on the file server and put the FE on the local drives of two machines so that I could run it locally on both at once. Then I can step through the procedure on each machine to control execution timing and study the locking behavior.
The unexpected result, however, is that (in certain cases -- see below) as soon as one machine has a recordset open against the table, the other machine is unable to open a recordset against the same table. This is regardless of whether the first machine has begun any edits to the recordset. I didn't expect to see any conflicts in opening the recordsets -- I only expected conflicts when one machine had a record locked for editing and the other then tried to edit that same record.
Here's an important complication: one machine is running the full version of Access, but the other is running the Access Runtime. I only have this problem when the Full Version opens the recordset first, and then the Runtime tries to get a recordset open. It fails and raises this error: "Disk or network error" (#-2147467259). If the Runtime opens the recordset first, the Full Version seems to have no trouble opening a recordset and I can observe the expected behavior.
Does anybody know what's going on here? The implication is that if one of my users is editing a record, other users may be unable to even view data anywhere in the table. Does Access lock the entire table?
Thanks in advance for any help!
P.S. If you're wondering how I "step through" the code in the Runtime environment, I'm not using the VBE's debugging features -- I just put calls to MsgBox() between every line of code in the procedure.