|
 |
asp_databases thread: READ-ONLY error message with Access DB
Message #1 by "Ken Mosher" <vorlon_ken@h...> on Wed, 13 Dec 2000 16:36:40 -0000
|
|
I am getting the following READ-ONLY error mesage with a very simple ASP
page that uses an Access database. I have other ASP pages that are part
of other projects that do more complicated things, including updating an
Access db that work fine, so this is driving me nuts. I can run this
under PWS (change drive letter for DBQ) and it runs perfectly, no errors.
Try to run it on our staging web server and I get the error!
"Line 99" is the "rs.update" line. Does anybody have a clue why this is
happening? I have recreated the db from scratch, no effect.
(Yes, "risk.mdb" is the db name and "risk" is the table name. It's not my
project, I'm just helping!)
Thanks - Ken
- - - - - - - - - -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/dph/signal/Osteoporosis/response.asp, line 99
- - - - - - - - - -
<% Response.Buffer = true %>
<!-- #include file="adovbs.inc" -->
<%
dim riskmdb, rs, strsql, strconn
set riskmdb = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
strconn = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=e:\inetpub\wwwroot\dph\Signal\Osteoporosis\risk.mdb"
riskmdb.open strconn
strsql = "select * from [risk]"
rs.open strsql, riskmdb, adOpenDynamic, adLockOptimistic, adCmdText
if request.form("exercise") <> "" then rs("exercise") = rs("exercise") + 1
if request.form("lowcalciumdiet") <> "" then rs("lowcalciumdiet") = rs("lowcalciumdiet") + 1
if request.form("highsaltprotein") <> "" then rs("highsaltprotein") = rs("highsaltprotein") + 1
if request.form("smoking") <> "" then rs("smoking") = rs("smoking") + 1
rs.update
rs.close
riskmdb.close
%>
---
NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS? Is FREE okay?
Visit EarthWeb for the latest in IT Management, Software Development,
Web Development, Networking & Communications, and Hardware & Systems.
Click on http://www.earthweb.com for FREE articles, tutorials,
and discussions from the experts.
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #2 by Stephane_Dattenny@D... on Wed, 13 Dec 2000 12:59:18 -0600
|
|
Change Security property for
e:\inetpub\wwwroot\dph\Signal\Osteoporosis\risk.mdb
Anonymous Internet User (IUSR_MACHINENAME) must have full access to that
Access Database file.
Because you copied it to a directory under inetpub, ReadOnly has been
applied to that file.
Best regards / Cordialement
Stephane Dattenny
Dell Computers - EMEA IT - VB and Web developer
Phone: +33 (0)4 99 75 49 88
-----Original Message-----
From: Ken Mosher [mailto:vorlon_ken@h...]
Sent: 13 December 2000 17:37
To: ASP Databases
Subject: [asp_databases] READ-ONLY error message with Access DB
I am getting the following READ-ONLY error mesage with a very simple ASP
page that uses an Access database. I have other ASP pages that are part
of other projects that do more complicated things, including updating an
Access db that work fine, so this is driving me nuts. I can run this
under PWS (change drive letter for DBQ) and it runs perfectly, no errors.
Try to run it on our staging web server and I get the error!
"Line 99" is the "rs.update" line. Does anybody have a clue why this is
happening? I have recreated the db from scratch, no effect.
(Yes, "risk.mdb" is the db name and "risk" is the table name. It's not my
project, I'm just helping!)
Thanks - Ken
- - - - - - - - - -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object
is read-only.
/dph/signal/Osteoporosis/response.asp, line 99
- - - - - - - - - -
<% Response.Buffer = true %>
<!-- #include file="adovbs.inc" -->
<%
dim riskmdb, rs, strsql, strconn
set riskmdb = Server.CreateObject("ADODB.Connection")
set rs = Server.CreateObject("ADODB.Recordset")
strconn = "Driver={Microsoft Access Driver (*.mdb)};
DBQ=e:\inetpub\wwwroot\dph\Signal\Osteoporosis\risk.mdb"
riskmdb.open strconn
strsql = "select * from [risk]"
rs.open strsql, riskmdb, adOpenDynamic, adLockOptimistic, adCmdText
if request.form("exercise") <> "" then rs("exercise") = rs("exercise") +
1
if request.form("lowcalciumdiet") <> "" then rs("lowcalciumdiet")
rs("lowcalciumdiet") + 1
if request.form("highsaltprotein") <> "" then rs("highsaltprotein")
rs("highsaltprotein") + 1
if request.form("smoking") <> "" then rs("smoking") = rs("smoking") + 1
rs.update
rs.close
riskmdb.close
%>
---
FREE WEB DEVELOPMENT CODE, CONTENT, AND INSIGHTS
IN YOUR INBOX!
Get the latest and best HTML, XML, and JavaScript tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb's
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
Message #3 by "Ken Schaefer" <ken@a...> on Thu, 14 Dec 2000 10:53:01 +1100
|
|
The IUSR_<machinename> account needs:
a) Read, Write permissions to the actual .mdb file
b) Read, Write and Delete permissions to the folder that the file is in (to
create, read and destroy the .ldb lockfile that is created when the database
is accessed)
HTH
Cheers
Ken
----- Original Message -----
From: "Ken Mosher" <vorlon_ken@h...>
To: "ASP Databases" <asp_databases@p...>
Sent: Thursday, December 14, 2000 3:36 AM
Subject: [asp_databases] READ-ONLY error message with Access DB
> I am getting the following READ-ONLY error mesage with a very simple ASP
> page that uses an Access database. I have other ASP pages that are part
> of other projects that do more complicated things, including updating an
> Access db that work fine, so this is driving me nuts. I can run this
> under PWS (change drive letter for DBQ) and it runs perfectly, no errors.
> Try to run it on our staging web server and I get the error!
>
> "Line 99" is the "rs.update" line. Does anybody have a clue why this is
> happening? I have recreated the db from scratch, no effect.
> (Yes, "risk.mdb" is the db name and "risk" is the table name. It's not my
> project, I'm just helping!)
>
> Thanks - Ken
---
FREE SOFTWARE DEVELOPMENT CODE, CONTENT, AND
INSIGHTS IN YOUR INBOX!
Get the latest and best C++, Visual C++, Java, Visual Basic, and XML tips, tools, and
developments from the experts. Sign up for one or more of EarthWeb?s
FREE IT newsletters at http://www.earthweb.com today!
---
You are currently subscribed to asp_databases as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-asp_databases-$subst('Recip.MemberIDChar')@p2p.wrox.com
|
|
 |