Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-06-13
3
Medium Priority
?
532 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

886 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