| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Read between da lines!
|
ASP Execute Problem - (Shot in the dark)
Yes, I know this is a "design" forum but occassionally there are some wonderful minds out there so here is my problem fellow peers: This is the problem I'm getting: Microsoft VBScript runtime error '800a0009' Subscript out of range: '[number: 1]' This means that I'm running an array (of course) and it could be choosing/selecting a number outside the range: Here is the code: If addOn <> "" Then addOnArr = Split(addOn, ",") For i=0 To UBound(addOnArr) op = split(trim(addOnArr(i) & " "), "|") Con.Execute("INSERT INTO Orders_options(orderID, opID, productID, optionID, amount, priceType, price) VALUES (" & session("orderID") & ", " & opID & ", " & productID & ", " & op(0) & ", " & amount & ", " & priceType & ", " & CInt(replace(op(1), ".", ",")) & ")") Next End If Complicated? You should see the rest of the site I'm building!! This is how I normally code an array but I obviously need to re-write this so it works. I'd be very very grateful for whatever notes of direction you guys can give! Cheers! |
|
|
|
![]() |