Reply LinkBack Thread Tools Search this Thread
Old 29-03-2006, 10:55   #1 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 846
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
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!
  Reply With Quote
Old 29-03-2006, 11:06   #2 (permalink)
forwardtrends
forwardtrends.com
 
Join Date: Mar 2006
Location: Pittsburgh, PA
Posts: 67
Post an example of the Array you are sending in.

What is op(0) you're inserting?
  Reply With Quote
Old 03-04-2006, 07:44   #3 (permalink)
i3lance
Read between da lines!
 
i3lance's Avatar
 
Join Date: Apr 2005
Location: UK, former Londoner
Posts: 846
Send a message via MSN to i3lance Send a message via Skype™ to i3lance
I may have sorted the problem FT, I'll let you know mate...thanks!
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8