help with access db and ASP

Results 1 to 2 of 2

Thread: help with access db and ASP

  1. #1
    mrmr Guest

    Default help with access db and ASP

    The following I keep getting when attempting to insert a record into my access database. I have placed some code that follows to see if someone can locate the problem.<BR><BR>Any help appreciated.<BR><BR><BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only. <BR><BR><BR><BR><BR><BR>Function OpenAccessDatabase(dbPath)<BR> Dim db<BR><BR> set db = Server.CreateObject("ADODB.Connection")<BR> db.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & dbPath & ";"<BR> db.Open<BR> <BR> set OpenAccessDatabase = db<BR>End Function<BR><BR>Sub CloseAccessDatabase(db)<BR> db.Close<BR> set db = nothing<BR>End Sub<BR><BR>Sub CloseAccessRecordSet(rs)<BR> rs.Close<BR> set rs = nothing<BR>End Sub<BR>.<BR>.<BR>.<BR>.<BR><BR> sql = "SELECT * FROM Users"<BR> <BR> &#039 open the recordset <BR> rs.Open sql, db, 3, 3<BR><BR> &#039 create a new record<BR> rs.AddNew<BR> rs(fldfirstname) = firstname<BR> rs(fldlastname) = lastname<BR> rs(fldcompany) = company<BR> rs(fldstreetaddress) = streetaddress<BR> rs(fldcity) = city<BR> rs(fldstate) = state<BR> rs(fldzipcode) = zipcode<BR> rs(fldemail) = email<BR> rs(fldphonenum) = phonenum<BR> rs(fldpassword) = password<BR> <BR> rs.update<BR> <BR> &#039 close the recordset<BR> CloseAccessRecordSet(rs)<BR><BR> CloseAccessDatabase(db)<BR>.<BR>.<BR><BR>

  2. #2
    mrmr Guest

    Default RE: help with access db and ASP

    Forgot to mention...<BR><BR>I get the error at the rs.update line in the code from the previous message

Posting Permissions

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