Microsoft VBScript 运行时错误 错误 '800a000d' 类型不匹配: '[string: ""]' /productbuy/index

s_smile s_smile 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
Microsoft VBScript 运行时错误 错误 '800a000d'

类型不匹配: '[string: ""]'

/productbuy/index.asp,行 138
请高手帮我解决一下问题?好吗?
下面是源代码


<!--#include file="../inc/AspCms_SettingClass.asp" -->
<%
'echo "进入cart"
'echo getForm("proid","both")
'Session.Abandon()
dim action:action=getForm("act","both")
'dim proid:proid=getForm("id","both")
dim proid:proid=cint(request("proid"))


'Set Session("Cart") = Nothing
'Set Session("Cart.Price") = Nothing

Add2Session
Cart_Load


'加入购物车
Sub Add2Session
Dim dicCount,dicPrice,pid,count,price
pid = getForm("proid","post")
count = getForm("count","post")
price = getForm("proprice","post")
pid = cint(pid)
count = cint(count)

if pid="" then exit sub
If IsEmpty(Session("Cart")) Then
Set dicCount = Server.CreateObject("Scripting.Dictionary")
Set dicPrice = Server.CreateObject("Scripting.Dictionary")
Else
Set dicCount = Session("Cart")
Set dicPrice = Session("Cart.Price")
End If

if dicCount.Exists(pid) then
dicCount(pid) = count
dicPrice(pid) = price
else
dicCount.add pid,count
dicPrice.add pid,price
end if

Set Session("Cart") = dicCount
Set Session("Cart.Price") = dicPrice
End Sub
'所有保存
Sub All2Cart
Dim dicCount,dicPrice,pid,count,price,i,keysPrice,keysCount
'pid = getForm("proid","post")
'count = getForm("count","post")
'price = getForm("price","post")
if pid="" then exit sub
If IsEmpty(Session("Cart")) Then
Set dicCount = Server.CreateObject("Scripting.Dictionary")
Set dicPrice = Server.CreateObject("Scripting.Dictionary")
Else
Set dicCount = Session("Cart")
Set dicPrice = Session("Cart.Price")
End If
keysPrice = dicPrice.keys
keysCount = dicCount.keys
for i=0 to dicCount.Count-1
if dicCount.Exists(keysCount(i)) then
echo getForm("count"&keysCount(i),"post")
dicCount(keysCount(i)) = getForm("count"&keysCount(i),"post")
echo getForm("proprice"&keysPrice(i),"post")
dicPrice(keysPrice(i)) = getForm("proprice"&keysPrice(i),"post")
else
dicCount.add keysCount(i),getForm("count"&keysCount(i),"post")
dicPrice.add keysPrice(i),getForm("proprice"&keysPrice(i),"post")
end if
next
Set Session("Cart") = dicCount
Set Session("Cart.Price") = dicPrice
End Sub




'从购物车删除
Sub DeleteFromSession(proid)
Dim dicCount,dicPrice
If Not IsEmpty(Session("Cart")) Then
Set dicCount = Session("Cart")
Set dicPrice = Session("Cart.Price")
If dicCount.exists(proid) Then dic.remove(proid)
If dicPrice.exists(proid) Then dic.remove(proid)
End If
Set Session("Cart") = dicCount
Set Session("Cart.Price") = dicPrice
Response.Redirect Request.ServerVariables("HTTP_REFERER")
End Sub



'显示购物车
Function CartList
Dim dic,md
Dim rs,sql
Dim result,total,tcount
Dim fid

fid=getForm("proid","post")


result = "<form name='frmCart' action='?action=all2cart'>"
result = result & "<ul class=""atable"">"
result = result & "<li class=""ahead"">"
result = result & "<div class=""p_img"">商品图片</div>"
result = result & "<div class=""p_name"">商品名称</div>"
result = result & "<div class=""p_price"">价格</div>"
result = result & "<div class=""p_count"">数量</div>"
result = result & "<div class=""p_total"">小计</div>"
result = result & "<div>操作</div>"
'<input type='hidden' name='action' value='all2cart' />
result = result & "</li>"
tcount = 0

If Not IsEmpty(Session("Cart")) Then
Set dic = Session("Cart")
For Each md In dic
'echo md & dic(md) & "<hr>"
sql = "select P_Price,IndexImage,title,contentid from {prefix}Content where contentid=" & md
Set rs = GetRS(sql)
result = result & "<li>"
result = result & "<div class='p_img'><a title='点击查看原图' href='../content/?"&rs("contentid")&".html' target=_blank>"
if rs("IndexImage") = "" then
result = result & "<img src='../Images/nopic.gif' /></a></div>"
else
result = result & "<img src='"&rs("IndexImage")&"' /></a></div>"
end if

result = result & "<div class='p_name'><a title='"&rs("title")&"' href='../content/?"&rs("contentid")&".html' target=_blank>"&rs("title")&"</a></div>"
result = result & "<div class='p_price'><span id='price"&md&"'>"&rs("P_Price")&"</span>元<input type='hidden' name='price"&md&"' value='"&rs("P_Price")&"'></div>"
result = result & "<div class='p_count'><input id='count"&md&"' name='count"&md&"' maxlength='5' onkeyup=""this.value=this.value.replace(/\D/g,'');changePrice(this,"&md&")"" onafterpaste=""this.value=this.value.replace(/\D/g,'')"" onblur=""if(value==''){value='1';changePrice(this,"&md&")}"" maxlength='5' value='"&dic(md)&"'"
result = result & "'/></div>"
result = result & "<div class='p_total'><span id='curtotal"&md&"'>"&dic(md) * rs("P_Price")&"</span>元</div>"
result = result & "<div><a href='javascript:void(0)' onclick='deleteItem("&md&",this)'>删除</a></div>"
result = result & "</li>"
total = total + (dic(md) * rs("P_Price"))
tcount = tcount + dic(md)
rs.close:set rs = nothing
Next

End If
result = result & "</ul>"
result = result & "<div style='float:left;width:600px'>你的购物车里有商品:<span id='allcount'>"&tcount&"</span> 件 共计:<span id='alltotal'>"&total&"</span> </div>"
result = result & "<div style='float:left;width:600px'><a class='button_2' style='float:left;letter-spacing:0px; margin-right:20px;' href='../'>继续购物</a> <a class='button_2' style='float:left' href='checkout.asp'>订购</a></div>"
result = result & "</form>"

CartList = result
'die result
End Function


Function GetRS(sql)

On Error Resume Next
Set GetRS = conn.exec(sql,"r1")
If Err Then
'echo sql
'die err.description
die "错误,表结构不是最新版本"
End If
End Function


Sub TestA
Dim dic,md
Set dic = Session("Cart")

for each md in dic
echo md & dic(md) & "<hr>"
next

die "结束"
End Sub

Sub Cart_Load
dim id, sortID,SortAndID
SortAndID=split(replaceStr(request.QueryString,FileExt,""),"_")
if isNul(replaceStr(request.QueryString,FileExt,"")) then echoMsgAndGo "页面不存在",3
Session("Cart_QS") = Request.QueryString
SortID = SortAndID(0)
if not isNul(SortID) and isNum(SortID) then SortID=clng(SortID) else echoMsgAndGo "页面不存在",3 end if
id=SortAndID(1)
if not isNul(id) and isNum(id) then id=clng(id) else echoMsgAndGo "页面不存在",3 end if

if isnul(id) or not isnum(id) then alertMsgAndGo "请选择产品!","-1"
if isnul(sortID) or not isnum(sortID) then alertMsgAndGo "请选择产品!","-1"

dim templateobj,channelTemplatePath : set templateobj = new TemplateClass
dim typeIds,rsObj,rsObjtid,Tid,rsObjSmalltype,rsObjBigtype
Dim templatePath,tempStr
templatePath=sitePath&"/"&"templates/"&setting.defaultTemplate&"/"&setting.htmlFilePath&"/productcart.html"
if not CheckTemplateFile(templatePath) then echo "productcart.html"&err_16

set rsobj=conn.exec("select * from {prefix}Sort where SortID="&sortID, "exe")
if rsObj.eof then
echoMsgAndGo "页面不存在",3
'exit sub
end if
with templateObj
.content=loadFile(templatePath)
.parseHtml()
templateObj.content=replace(templateObj.content,"{aspcms:sortname}",rsObj("SortName"))
templateObj.content=replace(templateObj.content,"{aspcms:parentsortid}",rsObj("parentid"))
templateObj.content=replace(templateObj.content,"{aspcms:sortid}",sortID)
templateObj.content=replace(templateObj.content,"{aspcms:topsortid}",rsObj("topsortid"))
if isnul(rsObj("PageKeywords")) then
templateObj.content=replace(templateObj.content,"{aspcms:sortkeyword}",setting.siteKeyWords)
else
templateObj.content=replace(templateObj.content,"{aspcms:sortkeyword}",rsObj("PageKeywords"))
end if
if isnul(rsObj("PageDesc")) then
templateObj.content=replace(templateObj.content,"{aspcms:sortdesc}",setting.sitedesc)
else
templateObj.content=replace(templateObj.content,"{aspcms:sortdesc}",rsObj("PageDesc"))
end if
if isnul(rsObj("PageTitle")) then
templateObj.content=replace(templateObj.content,"{aspcms:sorttitle}",rsObj("SortName"))
else
templateObj.content=replace(templateObj.content,"{aspcms:sorttitle}",rsObj("PageTitle"))
end if
templateObj.parsePosition(sortID)

dim selectproduct
set rsObj=conn.Exec("select title from {prefix}Content where ContentID="&id,"r1")
selectproduct=rsObj(0)

rsObj.close()
.content=replaceStr(.content,"{aspcms:cartlist}",CartList)
.parseCommon()
echo .content
end with
set templateobj =nothing : terminateAllObjects
End Sub

%>
...全文

相关推荐

ASP彩票合买系统部署与VBScript业务逻辑解析

Classic ASP 是微软早期服务器端脚本技术,基于 VBScript 和 ADO 访问数据库,运行于 IIS 环境。其核心原理是请求驱动、同步执行、无状态会话,依赖 COM 组件和 ISAPI 扩展实现动态交互。在遗留系统维护、政务/彩票类私有化部署等场景中仍具工程价值,尤其适合 Windows Server 环境下的轻量级业务闭环构建。本文围绕一套真实可用的 ASP 彩票合买系统,详解 IIS 环境搭建、VBScript 事务控制、SQL 注入防护、CSS 大小写兼容及 C DLL 集成等关键技术点

用户甲

战国BC472年世界历史地图矢量文件SHP格式.zip

本资源为《战国BC472年世界历史地图矢量文件SHP格式》压缩包,文件大小约 2.26 MB,便于集中下载、整理和使用。具体内容请结合压缩包内的实际文件与说明查看。 在当前可读取的目录中,可见属性表(.dbf)、投影说明文件(.prj)、Shapefile 主文件(.shp)、Shapefile 索引(.shx)。建议解压后保持原有目录结构,先浏览文件清单与说明,再选择需要的资料进行加载或整理。 应用方面,可根据实际资料用于学习练习、资料检索、研究整理或项目参考。使用时可先确定所需内容,建立清晰的文件分类,再按项目要求进行筛选、转换与汇总。 使用 Shapefile 数据时,请把实际配套的 .shp、.shx、.dbf 等文件保存在同一目录,并保持同名关联;加载后再检查坐标系与中文字段显示。如需叠加其它数据,请先统一坐标与字段口径。 数据来源、时间范围、坐标系、字段定义、精度和使用条件,请以实际文件及原始说明为准。本介绍不对文件名之外尚未核实的信息作额外承诺。

白水先森

地方科技局搭建区域性科技成果转化公共服务平台,哪家机构提供的数智化方案更成熟?.docx

科易网基于行业知识库+行业大数据+科技资源要素+AI模型,以AI,赋能技术转移、成果转化、技术经理人培训、知识产权管理、区域产业分析与布局、地方科技招商、创新创业大赛等场景,推出科技创新领域的AI工具、场景化服务和数智化解决方案,推动科技创新与产业创新智能化发展。

BIZKEEN

F500A 立式机触摸屏程序

F500A 立式机触摸屏程序

czhaii

汉语言文学22班 马旭 1243022203 现当代文学读书笔记.pdf

img_to_pdf_1796121273101.pdf

AAA-妙脆角批发
评论 3
收藏 已收藏
分享
返回顶部
s_smile
疑难问题 22,299 成员 121,727 内容