| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 495 人关注过本帖
标题:[求助]标准表达式中数据类型不匹配.
只看楼主 加入收藏
sunyov
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-3-12
收藏
 问题点数:0 回复次数:2 
[求助]标准表达式中数据类型不匹配.

<%
public ProductList
if request("order1")="产品更新" then
Session("ProductList")=""
end if
ProductList = Session("ProductList")
Sub PutToShopBag(Prodid, ProductList)
If Len(ProductList) = 0 Then
ProductList = "'" & Trim(Prodid) & "'"
ElseIf InStr( ProductList, Prodid ) <= 0 Then
ProductList = ProductList&", '"&Trim(Prodid)&"'"
End If
End Sub
%>
<%
pid =Trim(Request("_id"))
if instr(pid,",")>0 then
idArr=Split(pid, ",")
for i = 0 to ubound(idArr)
PutToShopBag idArr(I), ProductList
next
else
PutToShopBag pid, ProductList
end if
%>

<%
Session("ProductList") = ProductList

'判断购物车是否为空
if Productlist<>"''" then
sql="select * from product where pid in ("&ProductList&") order by pid"
Set rs_price = conn.Execute(sql)
else
response.write "询价车中没有东东"
response.end
end if


Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。
/cn/Payment.asp, 第 39 行
Set rs_price = conn.Execute(sql)



购物车的程序,pid是自动编号长整型.怎么样才能让他们数据类型匹配

搜索更多相关主题的帖子: 类型 数据 表达 
2007-03-12 13:03
xiaohonghui0
Rank: 1
等 级:新手上路
威 望:1
帖 子:274
专家分:0
注 册:2006-4-10
收藏
得分:0 
回复:(sunyov)[求助]标准表达式中数据类型不匹配.

是哪一行啊,做上标记啊


曾用asp做过公司管理系统,新闻发布系统,个人网站之类,可代做网站 有意者请联系我,电话:13714123661
2007-03-12 14:35
xiaohonghui0
Rank: 1
等 级:新手上路
威 望:1
帖 子:274
专家分:0
注 册:2006-4-10
收藏
得分:0 
sql="select * from product where pid in ("&ProductList&") order by pid"
Set rs_price = conn.Execute(sql)
把它改成 set rs_price=server.CreateObject("adodb.recordset")
rs.open "select * from product where pid in ('"&ProductList&"') order by pid",myconn,1,1

或者:
sql="select * from product where pid in ('"&ProductList&"') order by pid"
Set rs_price = conn.Execute(sql)

试试!

曾用asp做过公司管理系统,新闻发布系统,个人网站之类,可代做网站 有意者请联系我,电话:13714123661
2007-03-12 14:40
快速回复:[求助]标准表达式中数据类型不匹配.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014237 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved