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!