[dba-VB] Exception: DataTable internal index is corrupted: '5'. on ...

Gustav Brock Gustav at cactus.dk
Tue May 13 06:50:42 CDT 2008


Hi Doris

It doesn't.

However, I think I tracked down the issue after much trial and error. 
It happens if you perform multiple updates of the same row when an update is called immediately following each value change of several controls via the GUI. By only performing one update for each row, the issue seems to stay dormant.

/gustav

>>> mikedorism at verizon.net 13-05-2008 13:15 >>>
If you were using a dataset, you would process an AcceptChanges statement
after the Update.  Not sure if data adapters have this option.

Doris Manning
Database Administrator
Hargrove Inc.

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com 
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Monday, May 12, 2008 3:50 PM
To: <dba-vb
Subject: [dba-VB] Exception: DataTable internal index is corrupted: '5'. on
...

Hi all

Anyone encountered this nasty bug?
It seems to have lived for years(!):

http://forums.microsoft.com/msdn/showpost.aspx?postid=277680&siteid=1&sb=0&d 
=1&at=7&ft=11&tf=0&pageid=10

I have a Winform with a DataGridView and some bound textboxes. Data source
is a DataTable.
Update goes like this:

                this.Validate(true);
                this.mediaBindingSource.EndEdit();
                this.mediaTableAdapter.Update(this.MyAdapter.Media);

Sometimes after multiple but not stressed updates, the exception error is
raised.

Any ideas or workarounds?

/gustav






More information about the dba-VB mailing list