Multi-user ADO connection to Access database : "Unrecognized database format"
Posted on 2008-06-13
I have an Excel pivot-table application that links to an Access database using ADO.
The pivot-tables are populated by ADO recordsets of tables in Access. There are several copies of the Excel frontend in use; a problem occurs if all the users open up their workbooks at the same time: multiple users cannot make a recordset of the same table at the same time. As soon as User 1's version has loaded the recordset to its pivot-table cache and closed the recordset, User 2's version can successfully do the same. But if both attempt to create a recordset of the same table at the same split-second moment, one of them will get either "Unrecognized database format" or "Could not use . . . file already in use".
I can make code execution loop until User 1 has closed his recordset by putting Resume in the procedure's error_handler, but I'd rather not.
As far as I can see, the ADO connection allows multiple users to connect to a table as I have created my connection with adoCn.Mode = adModeShareDenyNone.