Hi everyone,

The following code is for adding items selected into a cart, but im getting an
erro on line 28; which says
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'ubound'
/project/AddToCart.asp, line 28

Please ,please help. Here is the code

Thank you very much,
Grace
<%LANGUAGE="VBSCRIPT"%>
<%
Dim Products__value
Products__value = "0"
if (Request("ProductID") <> "") then Products__value = Request("ProductID")
%>
<%
Dim strSQL3
Set conn= Server.CreateObject("ADODB.Connection")
conn.open "Provider = Microsoft.Jet.OLEDB.4.0; Data
Source=D:\web\projects\99117741\project\pelahet.md b;"

strSQL3= "SELECT * FROM Products WHERE ProductID=" +
Replace(Products__value, "'", "''") + ""
set Products = Server.CreateObject("ADODB.Recordset")

Products.CursorType = 0
Products.CursorLocation = 2
Products.LockType = 3
Products.Open strSQL3, conn
Products_numRows = 0
%>

<%
'**Add to cart from Link on previous page**
'**Charon Cart**
'
Randomize Timer
isFound=true
for i=0 to ubound(CCcart,2)
if CCcart(CC_ProductID,i) = cstr(Products("ProductID")) then
CCcart(CC_Quantity,i) = CCcart(CC_Quantity,i) + 1
isFound=false
exit for
end if
if not isFound then
for i=0 to ubound(CCcart,2)
if CCcart(CC_ProductID,i) = "" then
CCcart(CC_ProductID,i)=Products("ProductID")
CCcart(CC_Quantity,i)=("1")
CCcart(CC_Name,i)=Products("Product")
CCcart(CC_Price,i)=Products("Price")
CCcart(CC_Size,i)=Request("Size")
CCcart(CC_Colour,i)=Request("Colour")
CCcart(CC_UniqueKey,i)=int(rnd*9999999)+10000000
exit for
end if
next
end if
CartToCookie CCcart,"PelahetCart"
CC_RedirectURL="ShoppingCart.asp"
Response.Redirect "ShoppingCart.asp"
next
%>
<html>
<head>
<title>Add from Link</title>
<meta http-equiv="Content-Type" content="text/html; cht=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
<%
Products.close
conn.close
set Products = nothing
%>