Database error when deleting a record

Results 1 to 2 of 2

Thread: Database error when deleting a record

  1. #1
    Join Date
    Dec 1969

    Default Database error when deleting a record

    Hi all,<BR><BR>getting an error when trying to delete from my access database<BR><BR>Error Type:<BR>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)<BR>[Microsoft][ODBC Microsoft Access Driver] Could not delete from specified tables.<BR>/focus/delete_entry.asp, line 13<BR><BR>here is the code for the delete_entry.asp page<BR><BR>&#060;%<BR><BR>Set conn = Server.CreateObject("ADODB.Connection")<BR> connectme="DRIVER={Microsoft Access Driver (*.mdb)}; "<BR> connectme=connectme & "DBQ=" & Server.MapPath("focus.mdb")<BR> conn.Open connectme<BR> <BR>ID=request.querystring("ID")<BR><BR><BR>SQLstm t = "DELETE * from Offers where ID=" & ID<BR>Set RS = conn.execute(SQLstmt)<BR><BR>Conn.Close<BR><BR>Res ponse.Redirect "delete_select.asp"<BR><BR>%&#062;<BR><BR>any help would be much appreciated<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Possibly a read-only DB?

    Aside from the fact that the <BR> Set RS =<BR>in that is a waste of code, there&#039;s nothing obviously wrong. I&#039;d bet on the "focus.mdb" being read-only.<BR><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