Error inserting record

Results 1 to 3 of 3

Thread: Error inserting record

  1. #1
    Join Date
    Dec 1969

    Default Error inserting record

    Hello,<BR><BR>I&#039m having a problem inserting a record in a table.<BR>this is the code:<BR><BR>Dim Conn, Caminho, Sql, RS<BR>Set Conn=Server.CreateObject("ADODB.Connection")<BR>Se t RS=Server.CreateObject("ADODB.RecordSet")<BR>Camin ho="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(" ubusdbasptubus.mdb") & ";Persist Security Info=False"<BR>Conn.Open(Caminho)<BR>SQL="SELECT * FROM USERS"<BR>RS.Open sql,Conn,3,3<BR>RS.AddNew<BR>RS("codigo")=Request. Form("codigo")<BR>RS("nome")=Request.Form("nome")< BR>RS("genero")=Request.Form("genero")<BR>RS("pass word")=Request.Form("password")<BR>RS.Update<BR>RS .Close<BR>RS=Nothing<BR>Conn.Close<BR>Set Conn=Nothing<BR><BR>AND THIS IS THE ERROR:<BR>Microsoft JET Database Engine error &#039 80040e09&#039 <BR>Cannot update. Database or object is read-only. <BR>/tubus/enteruser.asp, line 34 <BR><BR>THANKS A LOT :-)

  2. #2
    droy Guest

    Default RE: Error inserting record

    Make sure you&#039ve got write permissions on both the mdb file and the directory it is in. I came across this problem where my web hosting company did not apply write permissions to the directory where my mdb file was... which meant the Access locking file (.ldb) could not be written.<BR><BR>Hope this solves your problem.

  3. #3
    iyyappan n iyer Guest

    Default RS.Open sql,Conn,2,2

    try this line for opening recordset<BR>RS.Open sql,Conn,2,2<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts