Order Details error
Hi, I have created my first shopping cart and all was going well. I then added the functionality to record the order before sending it to paypal. I tested it and it worked OK, the second time I tested it it failed! I had made no changes!
The summary table had been updated but not the details page this is where the error happens.
The line pointed as the error is the last line in this block of code.
<%' WA eCart Store Cart Details in Db
if (Request.ServerVariables("Request_Method") = "POST") then
WA_connection = MM_nss_STRING
WA_table = "OrdersDetails"
WA_redirectURL = ""
WA_indexField = "id_order"
WA_fieldNamesStr = "id_order|id_cust|id_course|id_child"
WA_fieldValuesStr = WA_eCDB_ConvertNumber("" & cStr(Session("eCart1_OrderID")) & "") & "|" & "" & cStr(WA_eCart_DisplayInfo(eCart1, "idcust")) & "" & "|" & "" & cStr(WA_eCart_DisplayInfo(eCart1, "ID")) & "" & "|" & "" & cStr(WA_eCart_DisplayInfo(eCart1, "Childname")) & ""
WA_columnTypesStr = "none,none,NULL|',none,''|',none,''|',none,''"
indexFieldIndex = -1
WA_fieldValues = Split(WA_fieldValuesStr,"|")
if (WA_redirectURL <> "" AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?") > 0) then
WA_redirectURL = WA_redirectURL & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
WA_cmdObjString = "ADODB.Command"
set WA_editCmd = Server.CreateObject(WA_cmdObjString)
WA_editCmd.ActiveConnection = WA_connection
WA_fieldNames = Split(WA_fieldNamesStr,"|")
WA_columns = Split(WA_columnTypesStr,"|")
for i = 0 to Ubound(WA_fieldNames)
if (WA_indexField = WA_fieldNames(i)) then
indexFieldIndex = i
exit for
end if
next
deleteFieldValue = cStr(WA_fieldValues(indexFieldIndex))
if (deleteFieldValue <> "" AND deleteFieldValue <> "undefined") then
deleteParamsObj = WA_generateInsertParams(Array(WA_indexField), Array(WA_columns(indexFieldIndex)), Array(deleteFieldValue), -1)
WA_editCmd.CommandText = "Delete from " & WA_table & " where " & WA_indexField & " = " & deleteParamsObj(2)
WA_editCmd.Execute()
The error message is the following.
Microsoft OLE DB Provider for ODBC Drivers error '80040e07'
[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression.
/confirm.asp, line 152