Object reference not set to an instance of an object.
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState
oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState
oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
DataRowAction action, Boolean isInMerge)
at System.Data.DataRow.SetNewRecord(Int32 record)
at System.Data.DataRow.EndEdit()
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
value)
at System.Data.DataRowView.set_Item(String property, Object value)
at Lumedx.CardioDoc.UDF.CheckBoxAdapter.checkBox_CheckStateChanged(Object
sender, EventArgs e)

I get the above exception when I try to change the value of a column of a
data row view in the CheckStaeChanged event. The column is the same one the
checkbox's CheckState is bound to.

Re: RecordStateChanged Object reference not set to an instance by Val

Val
Tue May 03 17:43:27 CDT 2005

Hi Sankar,

This error means that your reference to the datarow or datacolumn probably
is Nothing and you try to change a value for it. Try to debug a code and see
if it is not a Nothing

--
Val Mazur
Microsoft MVP

http://xport.mvps.org



"Sankar Nemani" <snemani@nospamlumedx.com> wrote in message
news:u0x00u$TFHA.2996@TK2MSFTNGP15.phx.gbl...
> Object reference not set to an instance of an object.
> at System.Data.DataTable.RecordStateChanged(Int32 record1,
> DataViewRowState oldState1, DataViewRowState newState1, Int32 record2,
> DataViewRowState oldState2, DataViewRowState newState2)
> at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
> DataRowAction action, Boolean isInMerge)
> at System.Data.DataRow.SetNewRecord(Int32 record)
> at System.Data.DataRow.EndEdit()
> at System.Data.DataRow.set_Item(DataColumn column, Object value)
> at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
> value)
> at System.Data.DataRowView.set_Item(String property, Object value)
> at
> Lumedx.CardioDoc.UDF.CheckBoxAdapter.checkBox_CheckStateChanged(Object
> sender, EventArgs e)
>
> I get the above exception when I try to change the value of a column of a
> data row view in the CheckStaeChanged event. The column is the same one
> the checkbox's CheckState is bound to.
>
>