Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with server behaviour (delete record)

Status
Not open for further replies.

jeevenze

Technical User
Mar 13, 2001
62
US
I'm not overly familiar with ASP but I'm trying to build a shopping cart using ultra dev and Access. I have it set up so that after a user selects an item to buy (s)he goes to checkout page where the item is there. I want the user to be able to delete an item from their cart so I've inserted a radio button (named deleteID). I then inserted the delete server behavior and made the following changes to the default code,

I removed the following line:
<input type=&quot;hidden&quot; name=&quot;MM_recordId&quot; value=<%= rsCart.Fields.Item(&quot;cartID&quot;).Value %>&quot;>

I changed the following line:
if (CStr(Request(&quot;MM_delete&quot;)) <> &quot;&quot; And CStr(Request(&quot;MM_recordId&quot;)) <> &quot;&quot;) Then

to

if (CStr(Request(&quot;MM_delete&quot;)) <> &quot;&quot;) Then

and I changed the following line:
MM_editQuery = &quot;delete from &quot; & MM_editTable & &quot; where &quot; & MM_tableCol & &quot; = &quot; & MM_redordID

to

MM_editQuery = &quot;delete from tblCart where cartID='&quot; & Request(&quot;DeleteID&quot;) &&quot; ' &quot;

When I try to delete an item I get the following error message:
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'

[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.

/blackwood_gallery/checkout.asp, line 52.



Line 52 is MM_editCmd.Execute

I know this is a lot but if anyone can help me I'd really appreciate it.
Thank you very much.

Jeevenze
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top