Question

I am constrained by the following, no way around it:

  1. Read-Only Data: Microsoft Access
  2. JET 4.0 OLDB
  3. ASP.NET 2.0
  4. Shared Host, very little control.
  5. OR Mapper - LLBL Gen Pro

The app is a read-only tool that reads a lot of Microsoft Access Databases in the APP_Data folder. Works fine mostly.

Under load it starts failing accessing the Access MDBs.

What is the best strategy for accessing the Access MDBs to limit errors in accessing them? Right now I try, then Thread.Sleep(500) on an error then try again.

Was it helpful?

Solution

I think there may be ways to modify the isolation/concurrency/locking options when accessing the Access databases to eliminate overhead of managing locks. Perhaps try "Mode=Share Deny None;" in the connection string. I would not use this if you are modifying data in any way at anytime though as it's pretty much throwing out all the isolation/concurrency management that you get with a database. Use at your own risk.

OTHER TIPS

How frequently does the data change? If it's read-only can you load the data from the databases into cache and read it from there instead of directly from the databases?

What kind of specific errors getting. I assume they are connection errors?

This is a horrible solution but if you truly are "lost on a desert island with only these tools" and the access databases are completely read-only, then create multiple copies of each of them and allow only a certain number of connection into any of them at a time. For example, if you have 2 access databases, MdbAA and MdbBB then create copies like:

  • MdbAA01
  • MdbAA02
  • MdbAA03
  • MdbBB01
  • MdbBB02
  • MdbBB03

Then when a request comes for MdbAA, see how many requests are currently accessing MdbAA01, if over the threshold, then try MdbAA02, etc. Do the same for any requests to the MdbBB file.

Like I said this is very bad solution but if you truly have no choice then it might work for you. But realistically it sounds like the app has outgrown Access (and the shared host) so it is time to upgrade the architecture.

Spend a bit of money and get some sql storage. How much time have you spent working on fitting a crutch to a broken sounding system?

If the project is worth doing then it's worth investing some cold hard cash.

If a business is trying to force you down this route, explain why the option you have is not viable. If you suggested the option in the first place, grow a pair and explain why you were wrong, but this is how you can fix it.

Sorry if that comes off as flippant.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top