PDA

View Full Version : Database or object is read-only.


AnndyB
06-07-2003, 03:16 AM
Hello all

A little problem I'm having, I keep getting the following message whenever I try to write back to the db:

----------------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.

----------------------------------------------------

The code that calls this is below, erroring on the Rst.Update line:

----------------------------------------------------
Cnct.Open "myconnection"

SQL_Select = "SELECT * from Tbl_Account "

Rst.Open SQL_Select, Cnct, adOpenDynamic, adLockOptimistic


Rst.AddNew

Rst("Forenames")=Request.Form("Forenames")
Rst("Surname")=Request.Form("Surname")
Rst("UserName")=Ucase(trim(Request.Form("UserName")))
Rst("Password")=Ucase(trim(Request.Form("Password")))
if Request.Form("Active")="on"then
Rst("Active")=TRUE
else
Rst("Active")=FALSE
end if
if Request.Form("MembersList")="on"then
Rst("MembersList")=TRUE
else
Rst("MembersList")=FALSE
end if

Rst.Update

Rst.MoveLast

NewUserID = Rst("UserID")

Rst.Close
set Rst = nothing

Cnct.Close
set Cnct = nothing
%>

---------------------------------------------------------

I've checked the CHMOD values and USER/GROUPS have RWX rights.

Anybody know what my problem is?

Cheers

AnndY

Eric
06-08-2003, 04:46 AM
Have you checked out this article?
http://kb.discountasp.net/article.aspx?id=10047