asp代码运行时出错,错误类型:类型不匹配: 'ubound' 是怎么回事?
这段代码主要是实现基础的功能,代码如下:<html><head><title>机构</title><scriptla...
这段代码主要是实现基础的功能,代码如下:<html><head><title>机构</title><script language="javascript"></script><META content="Microsoft FrontPage 4.0" name=GENERATOR></HEAD><%sCartItemNums = session("cartitemnumarray")nCartItemQtys = session("cartitemqtyarray")nNumCartItems = ubound(sCartItemNums)'Determine the mode of this page's operation. If we got here from a' link that had a "mode" querystring of "add", mode is add:sMode = request.querystring("mode")'Or, we could have gotten here from a form:select case request.form("cmdSubmit")case "结帐" sMode = "checkout"case "改变数量" sMode = "recalc"'case "继续购物"'sMode = "continue"end selectif sMode = "add" thennThisItemIndex = 0sItemNo = ucase(request.querystring("itemno"))if nNumCartItems > 0 thenfor i = 1 to nNumCartItemsif ucase(scartitemnums(i)) = sItemNo thennThisItemIndex = iexit forend ifnextend ifif nThisItemIndex = 0 then nThisItemIndex = nNumCartItems + 1redim Preserve sCartItemNums(nThisItemIndex)redim Preserve nCartItemQtys(nThisItemIndex)sCartItemNums(nThisItemIndex) = sItemNonCartItemQtys(nThisItemIndex) = 1elsenCartItemQtys(nThisItemIndex) = nCartItemQtys(nThisItemIndex) + 1end ifsession("cartitemnumarray") = sCartItemNumssession("cartitemqtyarray") = nCartItemQtysnNumCartItems = ubound(sCartItemNums)end ifif sMode = "recalc" or sMode = "checkout" or sMode = "continue" thenfor i = 1 to nNumCartItemsnThisQty = int(request.form("txtItemQty" & i))nCartItemQtys(i) = nThisQtynextsession("cartitemnumarray") = sCartItemNumssession("cartitemqtyarray") = nCartItemQtysend ifselect case sModecase "continue"end selectset dbMain = server.createobject("ADODB.Connection")connstr
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询