Getting "Could not lock file error in asp trying to open access database

Posted on 2003-11-11
Last Modified: 2007-12-19
I am getting a "Could not lock file" error when i try to open an access database via asp.  I have IIS installed on a WIn2000 box and I believe the permission for IUSR_ are set correctly (IUSR _ has access to the database.)  It's not a problem with my connection string because I copied this web from a different box were it worked fine.  Any suggestions would be great.....
Question by:D_M_D
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3

Expert Comment

ID: 9722566
Just a thought, but is the connection trying to reference the database on your CD-ROM, or does it have read only privelages associated with it, or the folder?

LVL 10

Author Comment

ID: 9722818
The database resides in a sub directory under the wwwroot folder.   Just to test I create a VB project and added a data environment.  I was able to access the database that way, but not thru VBscript.

Accepted Solution

butcherd11 earned 125 total points
ID: 9722903
Okay, the next thing to try would be to check the permissions set against the folder the script is running from.

the IWAM user would be accessing for the VBProject... but through a browser, the IUSR account would be used, unless another is specified...

two things to try:
1) check the IUSR permissions.. whether they are read, or ( read/write ),
2) next thing if that doesn't work, would be to change the pooling on the folder by right clicking in IIS the virtual server in question. Tab through to the home directory folder, and make sure that
read is ticked, write is ticked.... then lower down ..

Execute permissions: Scripts Only
Application Protection: Low( IIS Process )

Hope this helps...


Dave :)

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

LVL 11

Expert Comment

ID: 9723193
I agree with dave...

When you open an access file it creates a lock file.  If the user has permissions to the access file, but not to the folder it is in, it would be unable to create the lock file, and would return the error message you're getting.

LVL 10

Author Comment

ID: 9723254
Sorry only have 75 points to offer...

Expert Comment

ID: 9723290
Did it work then ? ;)
LVL 10

Author Comment

ID: 9723472
I need to test at home.  I will let you know later today... Thanks
LVL 10

Author Comment

ID: 9726810
Thanks for your help.  The folder rights were incorrect.  I added write access and it worked.  


Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
what are list of ebay api errors 1 34
How to make a good PHP + MySQL + JS pagination system? 3 65
CSS - Centering an image 2 23
Secure log in 'box' 4 9
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question