Solved

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

Posted on 2008-06-13
3
516 Views
Last Modified: 2013-12-20
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.

0
Comment
Question by:TimHudspith
  • 2
3 Comments
 
LVL 15

Expert Comment

by:jmantha709
ID: 21779773
If you have many users, it might be better to switch to SQL Server instead of Access.
0
 

Author Comment

by:TimHudspith
ID: 21779816
I was thinking of a shorter-term solution.
0
 
LVL 15

Accepted Solution

by:
jmantha709 earned 500 total points
ID: 21779896
Well, I don't really know about the specific problem you're having, but for patching it short-term, use your Resume idea but also use a date/time variable that if you get in the resume mode, you don't get stuck there indefinitely.  Set the variable to the time you start the procedure, and just before resuming check the time difference between it and the currenttime.  After a certain acceptable treshold, exit instead of resuming.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now