ASP/.NET Web Hosting
* 3 Months FREE *
CLICK HERE!
 CoverYourASP --> Troubleshooting --> Database connection errors

Free membership

Join in the fun! Sign in
Member Services

Site navigation
Download the entire site!
Search my articles
Free Magazines
Browse the directory

Send me feedback
Buy my boxer shorts

Recommend this page
Printer-friendly page

Resources I recommend
Link to my site
Advertising slashed!
About your privacy
Legal stuff
Site statistics
152 active users
2883 visitors today
2816 pages today
(only part of today)
ASP.NET Showcase
ASP.NET Graph and Chart Component with FREE developer version

ASP.NET Shopping Cart and E-commerce Control with FREE trial download

ASP.NET Web Hosting with free month and setup

$15 Domain Name Registration from .DNR.
As seen on these sites
Special thanks go to the sites that support me by publishing my articles.
See more

CoverYourASP
Copyright © 1999-2008 James Shaw.
All rights reserved.

ASP.NET Blog
ASPRSS
ShawThing

Now open source with SourceForge!

Operation must use an updateable query.


MSDN references: Q175168

This is a very common error to encounter. Although there are other possible causes, as documented in the MSDN issue above, it has always been reported to me for one reason only - insufficient permission on the database or the folder containing the database.

The Internet Guest Account (IUSR_<machinename>) that is used to access files under IIS needs write permission in order to make changes to the database (obviously).

Note: In my code, even viewing most pages causes the database to be updated - anything from statistics gathering to incrementing the number of times and article has been viewed.

To fix the problem, right click the folder that contains the database, and choose Properties.

The dialog that appears will have a Security tab. Click on the tab to open that page. Highlight the Internet Guest Account in the top pane, and make sure that Write has a check next to it in the bottom pane. The reason that you need to give write permission to the folder, not just the database, is because Access will write a lock file (dbname.ldb) into that folder. That's why you keep your database in a separate folder to other files!

One more thing: Access also uses the temporary folder, as defined by the TMP or TEMP environment variables. If these variables are not defined, Access uses the winnt/system32 folder instead.

It is NOT recommended that you add Write permission to that folder, so make sure that you define both TEMP and TMP environment variables, then give the Internet Guest Account (IUSR_<machinename>) write permission to that folder.

Featured sponsor
My favorite resources

Selling products online - read how James does it now



New Proposal Kit Professional 5.1
Brand yourself as a top professional: create quotes and amazing proposals and get many legal documents free!

The latter saved me 3 times the purchase price on the first day I owned it!


I share my content

Supporting ASPRSS

Do you need a quick and easy way to link to my articles? All the information you need is published with ASPRSS...

CoverYourASP Mugs, T-shirts, caps - even Boxer shorts...
I don't make a penny from these, but they're a lot of fun! Don't you need a new mouse mat?


See my source code
wherever you see this icon...

You can also download the entire site source code for FREE!