473,387 Members | 1,313 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
da***@helixpoint.com
Nov 18 '05 #1
1 2515
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" <df*****@geodecisions.com> wrote in message
news:ej**************@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
da***@helixpoint.com

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: N. | last post by:
Insertion sort is O(N^2), but I figure I can get it in to O(N log2 N) if the inside loop of the insertion sort is replaced with a binary search. However, I'm having some implimentation problems......
1
by: Sam | last post by:
Hi all Is it possible to remove/disable automatic new row insertion feature in datagrid control(last row with * on the left)? I'm implementing a datagrid table which consists of 4 columns and...
85
by: Russ | last post by:
Every Python programmer gets this message occasionally: IndexError: list index out of range The message tells you where the error occurred, but it doesn't tell you what the range and the...
28
by: Peter Michaux | last post by:
Hi, I'm playing with dynamic script insertion to make a request to the server for a JavaScript file to be automatically run when it arrives in the browser. It works but... The page caching...
9
by: ckfan.painter | last post by:
I've run into a seemingly bizarre problem with insert() for std::vector. (This was done on Microsoft Visual C++ 2005 express version 8...maybe it is a compiler specific bug?) Here's the code: ...
19
by: tkpmep | last post by:
I have an ordered list e.g. x = , and given any positive integer y, I want to determine its appropriate position in the list (i.e the point at which I would have to insert it in order to keep the...
4
by: eight02645999 | last post by:
hi i have a list (after reading from a file), say data = I wanted to insert a word after every 'a', and before every 'd'. so i use enumerate this list: for num,item in enumerate(data): if...
7
by: Don Li | last post by:
Hi, Env is ms sql server 2000. ddl: create table srchPool(tid int primary key, taid int, s tynyint, uid tynyint); -- and sql server automatically creates a clustered index for the pk dml:
9
by: python_newbie | last post by:
I don't know this list is the right place for newbie questions. I try to implement insertion sort in pyhton. At first code there is no problem. But the second one ( i code it in the same pattern i...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.