I'm building a website with a shopping cart. But when I'm setting up the cartID, I get a error message. My browser is in norwegian, but I think the msg says "Type mismatch" (or something like that). Here is the code:
dim CartID
CartID = Request.QueryString ("CartID")
If CartID = "" Then
Dim randomnum, datenum
randomize
randomnum = int((999999-100000+1) * rnd + 100000)
datenum = replace(date,"/","")
CartID = randomnum & datenum
'Tester her om CartID er tom. Hvis det er tilfelle vil brukeren få en ny CartID.
Dim myRScart
Set myRScart = Server.CreateObject ("ADODB.Recordset")
myRScart.Open "Carts", myConn, 1, 3
myRScart.AddNew
myRScart("CartID") = CartID 'Here is where I get the error message!!
myRScart("CreatedD") = Date
myRScart("CreatedT") = Time
myRScart.Update
myRScart.Close
End If
dim CartID
CartID = Request.QueryString ("CartID")
If CartID = "" Then
Dim randomnum, datenum
randomize
randomnum = int((999999-100000+1) * rnd + 100000)
datenum = replace(date,"/","")
CartID = randomnum & datenum
'Tester her om CartID er tom. Hvis det er tilfelle vil brukeren få en ny CartID.
Dim myRScart
Set myRScart = Server.CreateObject ("ADODB.Recordset")
myRScart.Open "Carts", myConn, 1, 3
myRScart.AddNew
myRScart("CartID") = CartID 'Here is where I get the error message!!
myRScart("CreatedD") = Date
myRScart("CreatedT") = Time
myRScart.Update
myRScart.Close
End If