You did not show us your SQL, so we are left guessing.<BR><BR>I would say it's one of two things:<BR><BR>1) Incorrect SQL syntax<BR>2) Permissions problem (either with NT or with the database security itself) - Check to be sure you have correct access for WRITEs/UPDATEs
It means that you do not have the correct lock type on the recordset. If you use conn.execute(sql), you have a read only. I would use a curso of adForwardOnly and a locktype of adLockOptimistic.<BR><BR>So depending on how you are inserting:<BR><BR>dim objConn, objRS, sql<BR>set objConn = server.createobject("adodb.connection")<BR>set objRS = server.createobject("adodb.recordset")<BR>sql = "select field form table where id = value"<BR>objConn.open dbString<BR>objRS.open sql, objConn, adopenForwardOnly, adLockOptimistic<BR>objRs.addnew<BR>objrs("field") = fieldvalue<BR>objRs.update<BR>objRs.close<BR>objCo nn.close<BR>set objRS = nothing<BR>set objConn = nothing<BR><BR>The other option is to create a sql statement with the insert option of better yet a sql sever stored procedure!<BR><BR>Good luck!<BR><BR>- Joe
Hi,<BR>the problem is occurs mainly with the permission settings.<BR>so u ask ur network manager to change permission to read,write and execute to everyone to the folder which contains the database(i.e mdb file).<BR>thats all.then the code will work.<BR>all the best..<BR>
Make sure the recordset that you are inserting into is infact an updatable recordset. For example if the recordset that you are trying to insert into is a query based on 2 or more tables it may not be considered an updatable recordset because the DB engine doesn't quite know how to handle inserting into the recordset. You may need to break down your insert into several inserts that insert directly into recordsets based on tables and not a recordset based on query.