I’ve got a problem with an ASP page that queries an Access database. I’m very inexperienced with Access and ASP so my problem might be quite trivial.
I am developing an ASP search page for a library database. The page will only be used infrequently within a small company, so limitations on the number of concurrent users with MS Access shouldn’t be an issue. Additionally, for various reasons beyond my control, I need to stay with MS Access.
As a side note, this page will only be used internally at a small company so security is not of much concern.
My ASP page works fine only when I use it from my computer (I’m hosting it on my machine). When I try to use the page from another computer, just-in-time debugging throws up the following error message:
An exception of type ‘Microsoft JET Database Engine: The Microsoft Jet database engine cannot open the file ‘C:\Inetpub\wwwroot\searchengine\search\library. mdb’. It is already open exclusively by another user, or you need its data.’ was not handled.
While I’m pretty ignorant of what’s going on, I’m not stupid. So, I’ve tried giving read/write share permissions to the directory \search so that the user would have the ability to create the .LDB locking file (http://aspalliance.com/14#permissions
). I also tried playing around with the Tools>Security>User and Group Permissions. But not really knowing what I was doing, I just tried different things without success.
Code (line of code at which execution stops at is in red):
strDBPath = Server.MapPath("library.mdb")
Set cnnSearch = Server.CreateObject("ADODB.Connection")
cnnSearch.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"
(some code here... define strSQL)
Set rstSearch = cnnSearch.Execute(strSQL)
Set rstSearch.ActiveConnection = Nothing
Set rstSearch = Nothing
Set cnnSearch = Nothing
Any ideas what I need to do in order to get this working? Thanks!