KeystoneBlues
Programmer
This message is killing me..
Delete Record
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/ASP/DeleteCC.asp, line 8
My delete code is (which may be a mess by now, Ive tried so many different variations)
<html>
<body><h2>Record Deleted</h2>
<%
set conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("secureorderform.mdb")
cid=Request.Form("customerID")
set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM Results WHERE customerID='" & cid & "'",conn
sql="DELETE FROM Results"
sql=sql & " WHERE customersID='" & cid & "'"
response.write("Record " & cid & " was deleted!")
conn.close
%></body>
</html>
I know what it means.. I just cannot find any information that Can tell me what the proper parameters for numeric chars and text are.
I know the single quotes have something to do with it. But Ive tried every which way but loose and still every error message in the book has come up, and when I finaly get it right, i get the data type mismatch error..
My 1st field is numeric, the customerID. Thats my primary field that is autonumber. Others will be vary from text to numeric.
Please help if you can. Link is here
I am about a week old to asp programming. So far I love it but this is killing me. All of this to simply delete a record. Anyway, any help would be appriciated.
Delete Record
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/ASP/DeleteCC.asp, line 8
My delete code is (which may be a mess by now, Ive tried so many different variations)
<html>
<body><h2>Record Deleted</h2>
<%
set conn=Server.CreateObject("ADODB.Connection")
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("secureorderform.mdb")
cid=Request.Form("customerID")
set rs=Server.CreateObject("ADODB.Recordset")
rs.open "SELECT * FROM Results WHERE customerID='" & cid & "'",conn
sql="DELETE FROM Results"
sql=sql & " WHERE customersID='" & cid & "'"
response.write("Record " & cid & " was deleted!")
conn.close
%></body>
</html>
I know what it means.. I just cannot find any information that Can tell me what the proper parameters for numeric chars and text are.
I know the single quotes have something to do with it. But Ive tried every which way but loose and still every error message in the book has come up, and when I finaly get it right, i get the data type mismatch error..
My 1st field is numeric, the customerID. Thats my primary field that is autonumber. Others will be vary from text to numeric.
Please help if you can. Link is here
I am about a week old to asp programming. So far I love it but this is killing me. All of this to simply delete a record. Anyway, any help would be appriciated.