|
-
Jul 8th, 2010, 09:00 AM
#1
Thread Starter
PowerPoster
[RESOLVED] Index out of range (Datagridview - DataSet - MySQL)
Ola,
Having me a weird issue, which I can't seem to solve. I'm loading a table from a MySQL-server, which loads fine, but I also get the following error:
Error 5: Index was out of range, Must be non-negatives and less then the size of the collection.
Parameter name: index
I don't understand where it comes from and what it means.
This is how I load the database:
vb.net Code:
mysqlAdapter.SelectCommand = mysqlComm
mysqlAdapter.Fill(mysqlTable)
mysqlReader = mysqlComm.ExecuteReader
While mysqlReader.Read
sbar_progress.Value += 1
beslag_dg_beslag.DataSource = mysqlTable
End While
Thanks for the help in advance.
-
Jul 8th, 2010, 09:06 AM
#2
Re: Index out of range (Datagridview - DataSet - MySQL)
Might be useful to mention which line of code it tells you this issue is on.
-
Jul 8th, 2010, 09:07 AM
#3
Thread Starter
PowerPoster
Re: Index out of range (Datagridview - DataSet - MySQL)
It doesn't. I get this error in the exception... hmm... let me remove it. Stupid that I didn't think of that before. I'll be back with result.
-
Jul 8th, 2010, 09:38 AM
#4
Thread Starter
PowerPoster
Re: Index out of range (Datagridview - DataSet - MySQL)
It seemed that it didn't have anything to do with the database. I'm calling an event in the datagrid_selectionchange, whiched caused the error. Thanks for thinking with me.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|