Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Databases
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 19th, 2005, 08:25 AM
Registered User
Join Date: May 2005
Location: anytown, Vt, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access issues with ASP and a MS Access Database

Problem Context
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

What Next?
Any ideas what I need to do in order to get this working? Thanks!

Reply With Quote
  #2 (permalink)  
Old May 19th, 2005, 11:38 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

Well, the problem is, if there is an .ldb file, that is what generates the lock; you are trying to connect to the Access database that is on the same machine as the database, right? What is generating the ldb on the server?

Reply With Quote
  #3 (permalink)  
Old May 19th, 2005, 12:44 PM
Registered User
Join Date: May 2005
Location: anytown, Vt, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts

I'll try to clarify things a little. I believe that there is a .ldb file creating the lock (based upon reading http://aspalliance.com/14#permissions), but I haven't checked this for myself. The Access database is on the same machine as the webserver. I'm not sure, but I think this answers your follow-up question? Thanks.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Database migration MS Access 2003 to MS SQL 2000 ayazhoda SQL Server 2000 3 April 23rd, 2007 11:38 AM
Ms access database in asp-urgent plz netfresher Classic ASP Basics 1 June 30th, 2006 03:35 PM
How to connect to an MS Access database? petercahyadi Java Databases 3 February 22nd, 2005 07:28 PM
Issues Connecting to an Access 2000 Database... Jonny ADO.NET 1 February 11th, 2004 09:54 AM
Access XP VBA compatibility issues w/ Access 2000 bourgeois02 Access VBA 1 August 19th, 2003 04:14 PM

All times are GMT -4. The time now is 02:53 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.