Connecting Tech Pros Worldwide Forums | Help | Site Map

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

Gayathri
Guest
 
Posts: n/a
#1: Nov 18 '05
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...

Ken Cox [Microsoft MVP]
Guest
 
Posts: n/a
#2: Nov 18 '05

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


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

"Gayathri" <anonymous@discussions.microsoft.com> wrote in message
news:DF445509-30D7-4FFE-8FD0-DF6AD6CC8FBF@microsoft.com...[color=blue]
> 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...[/color]

George Ter-Saakov
Guest
 
Posts: n/a
#3: Nov 18 '05

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


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.




"Ken Cox [Microsoft MVP]" <BANSPAMken_cox@sympatico.ca> wrote in message
news:ejOCENeLEHA.620@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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[/color]
file[color=blue]
> (*.ldb) that prevents this type of use.
>
> Do all of your work through the Web pages and you'll have better luck.
>
> Ken
>
> "Gayathri" <anonymous@discussions.microsoft.com> wrote in message
> news:DF445509-30D7-4FFE-8FD0-DF6AD6CC8FBF@microsoft.com...[color=green]
> > 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.[/color][/color]
My[color=blue][color=green]
> > .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[/color][/color]
runtime[color=blue][color=green]
> > errors. Thanks a ton in advance...[/color]
>[/color]


Closed Thread