I have a DataTable in memory that is created from processed data from a previous query. To it I attach a Dataview. I'm reading through the DataView with a DataRecordViewer using a For Each loop.
The objective is to find similar records and then report the match to the user interface. When I find a matching record, I delete the record in the DataView using myDataView.delete. The records are deleted to make the next search run quicker.
The code runs fine in Visual Studio and also when installed on the development system. The database on the developement system is a copy of the production database.
When run on a production system with the production database, I get an error of "There is no row at position 16". The stack trace is "at System.Data.DataView.GetRecord(Int32 recordIndex).
Any suggestions why this could work on the development system and not on the production system?
It appears the first record deleted is around the 16th in the table, so that's what has me suspecting the deletion process. But when I step through the code it works find, so I have to sumise this from what's on the UI at the time of the crash.
Any suggetsions on how to duplicate the problem in the test environment?
Any suggestions on how to "refresh" the DataView after the deletes so it can be reused for the next search?
Thanks,
Bernie
The objective is to find similar records and then report the match to the user interface. When I find a matching record, I delete the record in the DataView using myDataView.delete. The records are deleted to make the next search run quicker.
The code runs fine in Visual Studio and also when installed on the development system. The database on the developement system is a copy of the production database.
When run on a production system with the production database, I get an error of "There is no row at position 16". The stack trace is "at System.Data.DataView.GetRecord(Int32 recordIndex).
Any suggestions why this could work on the development system and not on the production system?
It appears the first record deleted is around the 16th in the table, so that's what has me suspecting the deletion process. But when I step through the code it works find, so I have to sumise this from what's on the UI at the time of the crash.
Any suggetsions on how to duplicate the problem in the test environment?
Any suggestions on how to "refresh" the DataView after the deletes so it can be reused for the next search?
Thanks,
Bernie