Solved

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

Posted on 2008-06-13
3
521 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
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 Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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