When you create a brand new, empty DataTable and examine it in the debugger you'll see that it has one element in the indices (and LiveIndices) array. This index has no elements in the description and I'm not sure exactly what purpose it serves. Can anyone explain this
Now, if I blow away a populated DataTable via DataTable.Reset( ) all the indices are cleared, even the mystery one that existed with a newly constructed table. The reason I bring this up is that this discrepency appears to be causing me problems... When I Reset( ) a table, recreate it's column collection and primary key and add new data rows I get all the indices (for the columns) except that initial, empty index. And this difference appears to affect the DefaultView for the table (which stays at zero rows no matter what). Can anyone explain this one
Conversely, if I do not use Reset( ), but instead use DataTable.Clear( ) and then null out the PrimaryKey and clear the columns then *all* previous indices are kept even though some of them may no longer refer to column indices that exist!! This causes problems when adding data back into the table
Any and all help or advice will be appreciated. Thanks
-- T