Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO updating Access problem

Status
Not open for further replies.

SteveMersereau

Technical User
Feb 6, 2002
23
GB
I'm having trouble updating a database.. never had this one before!

I'm using this code;

Code:
Dim myRS
Set myRS = Server.CreateObject("ADODB.Recordset")
myRS.CursorType = 1
myRS.LockType = 3
myRS.Open "people", myConn
myRS.AddNew
myRS("name")=Request.Form("form_name")
.....etc etc
myRS.Update
myRS.Close
Set myRS = Nothing
myConn.Close
Set myConn=Nothing
%>

The error message I'm getting is

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

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

/db/dataentry/insert.asp, line 49

Where line 49 is;
myRS.Update

I've checked the locktype, and connection and they appear fine. The connection will read from the database ok.

Any ideas where to start...? it's an Access 2000 database by the way.

Love,
Steve
 
Are you on an NT4/Win2K box?

If so it may be that iusr doesn't have permissions on the
database file.
 
Try changing the cursortype to 2 rather than 1. Also add in the command myRS.cursorLocation=2.

Let me know if that helps. -Ovatvvon :-Q
 
Thanks everybody! It was IUSR permissions! Appreciate your help as always!!

Love,
Steve

... but she never lost her head ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top