|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
IndexOutOfRangeException - Index was outside the bounds of the arrcustomers and output text files to produce printed material. Then an XML file containing the fields of the original file along with all fields necessary to produce the output text files are saved as an XML file. If an individual's printed material is destroyed in the process of fulfillment, we must reproduce the output for them. We do this by reading the XML file back into a dataset and re-outputting the text files. The XML file (and hence the datatable in the dataset) have a LOT of fields/columns (some have over 1000). We discovered that if a column is added to the datatable at the end of the columns collection, AND is later referred to in a SELECT clause to return a row collection, AND then large amounts of columns are removed and then added back into the columns collection, the following error is thrown: System.IndexOutOfRangeException - Index was outside the bounds of the array. We also discovered that if we added the column referred to in the SELECT clause at the BEGINNING of the columns collection (which was not easy) the error did NOT occur. However, this is simply side-stepping the bigger issue. I have sample code that will duplicate this behavior, but that and the XML is too long to post. Is there some way to post this code and XML? This is running on .NET 1.1 framework. Any light that could be shed on this issue would be greatly appreciated. Thank you. |
|||||||||||||||||||||||