主题:寻求帮助 急急急!!!!
<!--#include file="conndh.asp" -->
<%
Sub PutToShopBag( Id, ProductList )
If Len(ProductList) = 0 Then
ProductList = "'" & Id & "'"
ElseIf InStr( ProductList, Id ) <= 0 Then
ProductList = ProductList & ", '" & Id & "'"
End If
End Sub
%>
<html>
<head>
<title>购物车</title>
<link href="css/mt_style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="self.focus();">
<%
'如果购买车为空,转入提示界面
ProductList = Session("ProductList")
If Len(ProductList) = 0 Then
Response.write "<table height=100% width=100% ><tr><td align=center>您好!目前您的购物车为空,是不是 <a href='javascript:window.close()'><b>继续购物</b></a>?</td></tr></table>"
response.end
end if
'判断是否支付,如支付转到支付页面,并生成在线支付所需数据参数
if request("payment")="开始支付" then
response.redirect "payment.asp"
end if
'取消要购买物品的处理
Quatityt=""
subslist=""
If Request("cmdShow") = "Yes" Then
ProductList = ""
Products = Split(Request("Id"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
if productlist<>"" then
[color=FF0000] Set rsc=Server.CreateObject("ADODB.RecordSet")
sqlc="select * from Product where Id in ("&productlist&") order by Id"
rsc.open sqlc,conn,1,1[/color]
else
Response.write "<table height=100% width=100% ><tr><td align=center>您好!目前您的购物车为空,是不是需要 <a href='../helpcenter.asp' target='blank_'><b>帮助</b></a>?还是 <a href='javascript:window.close()'><b>继续购物</b></a>?</td></tr></table>"
response.end
end if
%>
<table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" height="47"><font color=333333> 欢迎您的光临,您所订购的商品清单如下:</font></td>
</tr>
<tr>
<td colspan="4" height="88">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="567" bgcolor="#FCA607">
<form action="order_check.asp" method="POST" name="check">
<tr bgcolor="#FFFFFF">
<td width="56" height="25">
<div align="center"><font color="333333">取消</font></div>
</td>
<td width="283">
<div align="center"><font color="333333">商 品 名 称</font></div>
</td>
<td width="57">
<div align="center"><font color="333333">数 量</font></div>
</td>
<td width="85">
<div align="center"><font color="333333">单 价</font></div>
</td>
<td width="85">
<div align="center"><font color="333333">合 计</font></div>
</td>
</tr>
<%
Sum = 0
While Not rsc.EOF
Quatity = CInt( Request( "Q_" & rsc("Id")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rsc("Id")) )
If Quatity <= 0 Then Quatity = 1
End If
if len(Quatityt)=0 then
Quatityt=Quatity
else
Quatityt=Quatityt&","&Quatity
end if
if len(subslist)=0 then
subslist=rsc("name")
else
subslist=subslist&","&rsc("name")
end if
Session(rsc("Id")) = Quatity
Sum = Sum + csng(rsc("Price1")) * Quatity
Sum=FormatNumber(Sum,1)
%>
<tr bgcolor="#FFFFFF">
<td width="56" height="20" align="center">
<input type="CheckBox" name="Product_Id" value="<%=rsc("Id")%>" Checked>
<input type="hidden" name="subs" value="<%=rsc("name")%>">
</td>
<td width="283"> <font color="333333"><%=rsc("name")%></font></td>
<td width="57" align="center">
<input type="Text" name="<%="Q_" & rsc("Id")%>" value="<%=Quatity%>" size="2" class="form">
</td>
<td width="85" align=center><font color="333333"><%=FormatNumber(rsc("Price1"),1)%></font></td>
<td width="85" align=center><font color="333333"><%=FormatNumber(csng(rsc("Price1"))*Quatity,1)%></font></td>
</tr>
<%
rsc.MoveNext
Wend
rsc.close
set rsc=nothing
%>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="35" align="center">
<input type="submit" name="order" value="更新数量">
<input type="submit" name="payment" value="开始支付">
<input type="button" value="继续购物" language=javascript onClick="javascript:window.close()" name="button">
<input type="hidden" name="cmdShow" value="Yes">
</td>
<td colspan="3" align="right">
<b> 总价格 = <font color="#ff0000"><%=Sum%> </font></b>
</td>
</tr>
</form>
<tr><td colspan="5" bgcolor="#ffffff"><br><UL>
<LI>填写好需要的数量后,点击‘更新数量’
<LI>如果要取消某个商品,取消选择的勾号,再点击‘更新数量’
</UL></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
错误类型:
Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。
/dd/order_check.asp, 第 54 行
<%
Sub PutToShopBag( Id, ProductList )
If Len(ProductList) = 0 Then
ProductList = "'" & Id & "'"
ElseIf InStr( ProductList, Id ) <= 0 Then
ProductList = ProductList & ", '" & Id & "'"
End If
End Sub
%>
<html>
<head>
<title>购物车</title>
<link href="css/mt_style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" onLoad="self.focus();">
<%
'如果购买车为空,转入提示界面
ProductList = Session("ProductList")
If Len(ProductList) = 0 Then
Response.write "<table height=100% width=100% ><tr><td align=center>您好!目前您的购物车为空,是不是 <a href='javascript:window.close()'><b>继续购物</b></a>?</td></tr></table>"
response.end
end if
'判断是否支付,如支付转到支付页面,并生成在线支付所需数据参数
if request("payment")="开始支付" then
response.redirect "payment.asp"
end if
'取消要购买物品的处理
Quatityt=""
subslist=""
If Request("cmdShow") = "Yes" Then
ProductList = ""
Products = Split(Request("Id"), ", ")
For I=0 To UBound(Products)
PutToShopBag Products(I), ProductList
Next
Session("ProductList") = ProductList
End If
if productlist<>"" then
[color=FF0000] Set rsc=Server.CreateObject("ADODB.RecordSet")
sqlc="select * from Product where Id in ("&productlist&") order by Id"
rsc.open sqlc,conn,1,1[/color]
else
Response.write "<table height=100% width=100% ><tr><td align=center>您好!目前您的购物车为空,是不是需要 <a href='../helpcenter.asp' target='blank_'><b>帮助</b></a>?还是 <a href='javascript:window.close()'><b>继续购物</b></a>?</td></tr></table>"
response.end
end if
%>
<table width="630" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td colspan="4" height="47"><font color=333333> 欢迎您的光临,您所订购的商品清单如下:</font></td>
</tr>
<tr>
<td colspan="4" height="88">
<table border="0" cellspacing="1" cellpadding="0" align="center" width="567" bgcolor="#FCA607">
<form action="order_check.asp" method="POST" name="check">
<tr bgcolor="#FFFFFF">
<td width="56" height="25">
<div align="center"><font color="333333">取消</font></div>
</td>
<td width="283">
<div align="center"><font color="333333">商 品 名 称</font></div>
</td>
<td width="57">
<div align="center"><font color="333333">数 量</font></div>
</td>
<td width="85">
<div align="center"><font color="333333">单 价</font></div>
</td>
<td width="85">
<div align="center"><font color="333333">合 计</font></div>
</td>
</tr>
<%
Sum = 0
While Not rsc.EOF
Quatity = CInt( Request( "Q_" & rsc("Id")) )
If Quatity <= 0 Then
Quatity = CInt( Session(rsc("Id")) )
If Quatity <= 0 Then Quatity = 1
End If
if len(Quatityt)=0 then
Quatityt=Quatity
else
Quatityt=Quatityt&","&Quatity
end if
if len(subslist)=0 then
subslist=rsc("name")
else
subslist=subslist&","&rsc("name")
end if
Session(rsc("Id")) = Quatity
Sum = Sum + csng(rsc("Price1")) * Quatity
Sum=FormatNumber(Sum,1)
%>
<tr bgcolor="#FFFFFF">
<td width="56" height="20" align="center">
<input type="CheckBox" name="Product_Id" value="<%=rsc("Id")%>" Checked>
<input type="hidden" name="subs" value="<%=rsc("name")%>">
</td>
<td width="283"> <font color="333333"><%=rsc("name")%></font></td>
<td width="57" align="center">
<input type="Text" name="<%="Q_" & rsc("Id")%>" value="<%=Quatity%>" size="2" class="form">
</td>
<td width="85" align=center><font color="333333"><%=FormatNumber(rsc("Price1"),1)%></font></td>
<td width="85" align=center><font color="333333"><%=FormatNumber(csng(rsc("Price1"))*Quatity,1)%></font></td>
</tr>
<%
rsc.MoveNext
Wend
rsc.close
set rsc=nothing
%>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="35" align="center">
<input type="submit" name="order" value="更新数量">
<input type="submit" name="payment" value="开始支付">
<input type="button" value="继续购物" language=javascript onClick="javascript:window.close()" name="button">
<input type="hidden" name="cmdShow" value="Yes">
</td>
<td colspan="3" align="right">
<b> 总价格 = <font color="#ff0000"><%=Sum%> </font></b>
</td>
</tr>
</form>
<tr><td colspan="5" bgcolor="#ffffff"><br><UL>
<LI>填写好需要的数量后,点击‘更新数量’
<LI>如果要取消某个商品,取消选择的勾号,再点击‘更新数量’
</UL></td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>
错误类型:
Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。
/dd/order_check.asp, 第 54 行