Microsoft JET Database Engine (0x80040E14)
Syntaxisfout (operator ontbreekt) in query-expressie products.productID =
itemsOrdered.productID and itemsOrdered.orderID = 17and
itemsOrdered.productName = and itemsOrdered.productPrice =.
/mcartpal/reviewOrder.asp, line 105
Code:
<%@ Language=VBScript %>
<% pageTitle = "Review Order" %>
<!--#include file="adovbs.inc"-->
<!--#include file="db.asp"-->
<%
'******************************************************
'Copyright©2000-2001 MetaLinks.com @
http://metalinks.com
'******************************************************
%>
<html>
<head>
<meta name="GENERATOR" Content="Microsoft Visual Studio 6.0">
<title><%= pageTitle %></title>
<script LANGUAGE="JavaScript"><!--
function AbortEntry(sMsg, eSrc)
{
window.alert(sMsg);
// set focus and highlight to the offending error
eSrc.focus();
//eSrc.select();
}
function HandleKeyUp(eSrc)
{
// make sure the input is a numeric value
var val = parseInt(eSrc.value);
if (isNaN(val))
{
return AbortEntry("Must be a number.", eSrc);
}
// make sure the value is not negative
if (val < 0)
{
return AbortEntry("Number cannot be less than zero.", eSrc);
}
}
//-->
</script>
<style type="text/css">
<!--
a:link { color: #808080 }
a:visited { color: #808080 }
a:hover { color: #6699cc }
-->
</style>
</head>
<body bgcolor="#ffffff" topmargin="0" leftmargin="0" marginwidth="0"
marginheight="0" text="#808080">
<basefont face="Verdana" size="2">
<!-- #include file="header.asp" -->
<!-- #include file="menubar.asp" -->
<hr color="#cccccc" size="1" noshade>
<table border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0"
width="625">
<tr>
<td width="128" valign="top" align="center">
<table border="0" cellspacing="4" cellpadding="4" width="125">
<tr>
<td width="128" bgcolor="#FFFFFF">
<!-- #include file="left.asp" -->
</td>
</tr>
</table>
<td width="1" bgcolor="#000000"><img src="images/spacer.gif" width="1"
height="1" alt border="0"></td>
<td align="left" valign="top"><table border="0" cellspacing="4"
cellpadding="4"><tr><td>
<%
set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConString
if cstr(Session("orderID")) = "" then
Response.Write "<div align='center'>"
Response.Write "<p><font face='Verdana' size='4'><b>"
Response.Write "U heeft nog niets besteld." & "<br>"
Response.Write "Indien u eerder produkten in uw wagentje zette, "
Response.Write "heeft uw sessie een time-out.<br><br>"
Response.Write "<a href='default.asp'>Verder winkelen</a>"
Response.Write "<b></font></p>"
Response.Write "</div>"
else
intOrderID = cstr(Session("orderID"))
sqlText = "select products.productID, productName, " _
& "productPrice, quantity from products, " _
& "itemsOrdered where " _
& "products.productID = itemsOrdered.productID "_
& "and itemsOrdered.orderID = " & intOrderID _
& "and itemsOrdered.productName = " & strprodName _
& "and itemsOrdered.productPrice = " & intprodPrice
%>
<p><font face="Verdana" size="4"><strong>Review Your
Order</strong></font></p>
<p><font face="Verdana" size="2">Please review your order to be certain it
is correct.
To remove an item, set the quantity to zero and press the Update
Order button.</font></p>
<form action="checkout1.asp" method="post" id="form1" name="form1">
<table border="1" cellpadding="3" cellspacing="3" width="100%">
<tr bgcolor="#6699cc">
<td width="15%" align="left" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Quantity<strong></font></strong></strong></td>
<td width="44%" align="left" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Product Name<strong></font></strong></strong></td>
<td width="16%" align="left" valign="center"><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Unit Price<strong></font></strong></strong></td>
<td width="25%" align="right" valign="center" nowrap><font
color="#ffffff" face="Verdana" size="2" style="BACKGROUND-COLOR:
#6699cc"><strong>Extended Price<strong></font></strong></strong></td>
</tr>
<%
set rsReview = Conn.Execute(sqlText)
<-----------------------------------------this is the line
while not rsReview.EOF
intProdID = rsReview("productID")
strProdName = rsReview("productName")
ProdPrice = rsReview("productPrice")
intQuant = rsReview("quantity")
intTotal = intTotal + (intQuant * intProdPrice)
%>
<tr>
<td width="15%" valign="center" align="left"><font
face="Verdana" size="2">
<input name="quant<%= intProdID %>" size="6" value="
<%=intQuant%>" onSubmit="HandleKeyUp(this)">
</font></td>
<td width="44%" align="left"><font face="Verdana"
size="2"> <%= strProdName %>
</font></td>
<td width="16%" align="right"><font face="Verdana" size="2">
$<%= formatNumber(intProdPrice, 2) %>
</font></td>
<td width="25%" align="right"><font face="Verdana" size="2">
$<%= formatNumber((intQuant * intProdPrice), 2) %>
</font></td>
</tr>
<%
rsReview.MoveNext
wend
rsReview.Close
set rsReview = Nothing
%>
<tr>
<td valign="center" align="left"><font face="Verdana"
size="2"><strong>Total:<strong></font></strong></strong></td>
<td colspan="3" align="right" valign="center"><font
face="Verdana" size="2"><strong>
$<%= formatNumber(intTotal,2) %>
<strong></font></strong></strong></td>
</tr>
</table>
<p><input type="submit" name="control" value="Update Order">
<input type="submit" name="control" value="Go To Check-Out"></p>
</form>
<form action="default.asp" method="post" id="formx" name="formx">
<input type="submit" name="buttonX" value="Continue Shopping">
</form>
<%
end if
Conn.Close
set Conn = Nothing
%>
</td>
</tr>
</table>
</td>
</tr>
</table>
<hr color="#cccccc" size="1" noshade>
<!--#include file="footer.asp"-->
</body>
</html>