Link to home
Start Free TrialLog in
Avatar of TimHudspith
TimHudspith

asked on

Multi-user ADO connection to Access database : "Unrecognized database format"

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.

Avatar of jmantha709
jmantha709

If you have many users, it might be better to switch to SQL Server instead of Access.
Avatar of TimHudspith

ASKER

I was thinking of a shorter-term solution.
ASKER CERTIFIED SOLUTION
Avatar of jmantha709
jmantha709

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial