Cannot Update. Database or database object is read-only. Can anybody tell me why

I want to insert data from a web page into a microsoft access 2000 database using ADO. I wrote a routine that will do the job. Basically it is structured like that:
dim CONNECTIONSTRING , rs
Set Conn = CONNECTIONSTRING
rs. open conn, "tblname"
rs.addnew
...
rs.update
rs.close
The problem is any time this routine is executed, it stops at the line: rs.addnew and the browser (IE5) displays the message: Microsoft JET Engine error.Cannot update. Database or object is read-only. I went to the folder where the microsoft access file is located and checked to see if the read only property is checked, but it isn't. I also check the permissions on the folder as well as the ones of the web site to make sure that they are appropriate. But it's still not working. Can anybody tell what could be the problem?
[846 byte] By [mpoincare] at [2007-11-18 3:01:20]
# 1 Re: Cannot Update. Database or database object is read-only. Can anybody tell me why
The problem is you need to set the CursorType and LockType for the open method.

By default the values are adOpenForwardOnly and adLockReadOnly

which explain the message.

Instead do

rs. open conn, "tblname", adOpenDynamic, adLockOptimistic

or

rs. open conn, "tblname", 2, 3

For additional options and details goto

Open Method (ADO Recordset) (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdamth03_2.asp)

There is a link to both CursorType and LockType enums.
antares686 at 2007-11-9 13:33:06 >