Home > Archive > ASP .NET > May 2004 > Insertion index was out of range.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Insertion index was out of range.
|
|
|
| Insertion index was out of range. Must be non-negative and less than or
equal to size. Parameter name: index
Dim aaa As Integer = -1
Do While dr.Read
Dim thecount = UBound(arrList)
aaa += 1
For aa = 0 To UBound(arrList) - 1
Dim vall = InStr(UCase(dr("rpttype")), arrList(aa))
Dim MyPos = InStr(UCase(dr("rpttype")), arrList(aa), CompareMethod.Text)
If InStr(UCase(dr("rpttype")), arrList(aa)) > 0 Then
Dim thecc = dr("rpttype")
Dim thecc1 = aaa
qryFeed.DataBind()
qryFeed.Items.Insert(aaa, New ListItem(dr("rpttype"), dr("rpttype")))
****************I get the error on the last one
End If
Next
Loop
--
David Fetrow
Helixpoint LLC.
http://www.helixpoint.com
davef@helixpoint.com
| |
| Alvin Bruney [MVP] 2004-05-29, 11:39 pm |
| it looks like aaa is out of bounds
--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"DaveF" <dfetrow@geodecisions.com> wrote in message
news:ejyZBUNREHA.3016@tk2msftngp13.phx.gbl...
> Insertion index was out of range. Must be non-negative and less than or
> equal to size. Parameter name: index
>
> Dim aaa As Integer = -1
>
> Do While dr.Read
>
> Dim thecount = UBound(arrList)
>
> aaa += 1
>
> For aa = 0 To UBound(arrList) - 1
>
> Dim vall = InStr(UCase(dr("rpttype")), arrList(aa))
>
> Dim MyPos = InStr(UCase(dr("rpttype")), arrList(aa), CompareMethod.Text)
>
>
>
> If InStr(UCase(dr("rpttype")), arrList(aa)) > 0 Then
>
> Dim thecc = dr("rpttype")
>
> Dim thecc1 = aaa
>
>
>
> qryFeed.DataBind()
>
> qryFeed.Items.Insert(aaa, New ListItem(dr("rpttype"), dr("rpttype")))
> ****************I get the error on the last one
>
>
>
> End If
>
> Next
>
> Loop
>
>
>
> --
>
>
> David Fetrow
> Helixpoint LLC.
> http://www.helixpoint.com
> davef@helixpoint.com
>
>
|
|
|
|
|