Solved

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

Posted on 2008-06-13
3
517 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

932 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

13 Experts available now in Live!

Get 1:1 Help Now