[thelist] asp and database path question

Ken Schaefer ken at adOpenStatic.com
Mon Jul 19 07:39:19 CDT 2004


Two possible reasons:

a) coding error - ADO recordset is open with a adLockReadOnly cursor
(probably unlikely)

b) NTFS permissions problem. The folder you have placed the files into
doesn't have appropriate permissions for the user context that IIS is
impersonating (if you are allowing anonymous access, then this is the
IUSR_<machinename> account by default).

This account will need NTFS: Read+Write (RW) for both the actual .mdb
file -and- for the folder that the .mdb file is in (to create the .ldb
lockfile). Additionally, the Creator_Owner account will need permissions to
delete the .ldb file (however this is set by default for all folders
everywhere on the system).

If this is a hosted site, then the hosting company should provide a special
secured folder for you to place your .mdb files in. This folder:
a) has appropriate permissions configured to allow updates
b) has appropriate permissions configured to prevent anonymous users from
/downloading/ the .mdb file by typing in
http://servername/databases/yourdatabase.mdb

If this is your own server, then put the .mdb file /outside/ the webroot.
Instead of using Server.Mappath() and a virtual path, just type in the
physical location of the .mdb file, eg c:\datatabase\myDatabase.mdb

Cheers
Ken

----- Original Message ----- 
From: "Trisha Salas" <graftedin at sbcglobal.net>
To: <thelist at lists.evolt.org>
Sent: Monday, July 19, 2004 10:23 AM
Subject: Re: [thelist] asp and database path question


: Ken Schaefer wrote:
:
: > That's not a native ASP error. Your application is doing some kind of
: > error handling, and then is generating some kind of "friendly" error,
: > which may, or may not, be indicative of the underlying problem.
: >
: > Two options I would suggest:
: > a) put your database into the file structure that appears on the page
: > (ie into a folder called /db off the root of your website, and then
: > make sure the database is called bbdata.mdb (or visa versa: edit the
: > entries in the page to match what you have)
: >
: > b) If (a) doens't work, locate the line "On Error Resume Next" in your
: > ASP page. Comment that out by placing a ' at the beginning of the
: > line. Reload the page, and post the error you now see.
:
: Ken,
:
: I got the path right.  But now I am getting this error when I try to
: log-in as admin (btw, admin is my only option...it is greyed out)
:
: ##########begin error#############
:
: Microsoft OLE DB Provider for ODBC Drivers error '80004005'
:
: [Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or
: object is read-only.
:
: /tbcde/forum/admprefs.asp, line 152
:
: ##########end error#############
:
: This is restored from a backup made on the server.  It was sent to me as
: a zip file and I placed the appropriate stuff there.  I made a goof and
: deleted the database (not used to this stuff...very bad booboo).  The
: host sent me their backup and this is what is going on now.
:
: Thanks again,
: Trisha Salas



More information about the thelist mailing list