Well, at one level it's an ADO.NET bug - the DataView indexer should return
either a valid DataRowView, or throw an IndexOutOfRange Exception. Instead
it's crashed somwhere in setting up the DataView's row cache.
The question is, what have you done to upset it so?
Is the problem reproducible - can you you trap the exception in the
debugger?
Did the failure occur on first use for the view, or later?
How was the DataView and underlying table configured? Was anything
interesting changed (like filters, schema, ...) after initially loading the
table?
---
Nigel Norris
"Jonathan Allen" <x@x.x> wrote in message
news:O7******** ********@TK2MSF TNGP12.phx.gbl. ..
What could cause a stack trace like this?
Message:Object reference not set to an instance of an object.
Stack Trace:
at System.Data.Dat aView.GetRecord (Int32 recordIndex)
at System.Data.Dat aView.get_RowVi ewCache()
at System.Data.Dat aView.GetElemen t(Int32 index)
at System.Data.Dat aView.get_Item( Int32 recordIndex)
at myCode.myMethod
--
Jonathan Allen