Runtime error while accessing .aspx page if .mdb database is open

G

Guest

Hi
I am using MS Access to store the data in an .mdb file. And I observe that, if the .mdb is open, I receive a runtime error whenever I/someone tries to access any of the .aspx pages that needs to access this .mdb. My .aspx pages are using OleDb for the data retrieval. I do not want those runtime errors. Please enlighten me as to how to get rid of those runtime errors. Thanks a ton in advance...
 
K

Ken Cox [Microsoft MVP]

You can't open an Access database from the file system (as the logged on
user) and from the Web application at the same time. There's a locking file
(*.ldb) that prevents this type of use.

Do all of your work through the Web pages and you'll have better luck.

Ken
 
G

George Ter-Saakov

I believe you can open database with MS Access. Just need to be cautious how
you do that.

1. Make sure that "open mode" is set to shared. in MS Access 2000
Tools/Option/Advanced

2. When you want to share MDB file the LDB file is created. The most common
mistake, when used from web application, is that people forget to give
"Create File" permission to ASP.NET account on the folder where MDB files
is.
The result is: LDB file is not created and database is opened in Exclusive
mode.
If you want it to work correctly you must give "Create File" permissions to
the ASP.NET account (or whatever account used) on the folder where MDB file
resides.

Good luck with Access, and as soon as you can switch to MS SQL or at least
MSDE.
George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top