Can anyone point me in the right direction. I'm trying to delete a record from my database and get the error below. I think it is to do with CursorType & LockType property but have looked around the web for teh various type descriptions without finding my answer.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/removeme.asp, line 102
My code is made up of the following....
Dim Con
Connection Object
Dim contactsRS
Dim contactsSQL
'open Database and set record set
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("contacts.mdb")
Set contactsRS = Server.CreateObject("ADODB.Recordset")
'Find the email address and ID from the table that matches the request query strting fields
contactsSQL = "SELECT * FROM tblcontacts WHERE EmailAddress='" & Trim(Request.QueryString("emailaddress")) & "' AND ID=" & CInt(Request.QueryString("ID")) & ";"
contactsRS.LockType=3
contactsRS.CursorType=2
contactsRS.Open contactsSQL, con
contactsRS.delete
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot update. Database or object is read-only.
/removeme.asp, line 102
My code is made up of the following....
Dim Con
Connection Object
Dim contactsRS
Dim contactsSQL
'open Database and set record set
Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("contacts.mdb")
Set contactsRS = Server.CreateObject("ADODB.Recordset")
'Find the email address and ID from the table that matches the request query strting fields
contactsSQL = "SELECT * FROM tblcontacts WHERE EmailAddress='" & Trim(Request.QueryString("emailaddress")) & "' AND ID=" & CInt(Request.QueryString("ID")) & ";"
contactsRS.LockType=3
contactsRS.CursorType=2
contactsRS.Open contactsSQL, con
contactsRS.delete