G
Guest
Hi,
I have a very strange error.
string strFilter = "some filter expression";
drFoundRows = m_dsQuote.Tables["Some Table Name"].Select(strFilter);
if(1 != drFoundRows.Length)
{
return;
}
drFoundRows[0]["Some Column"] = 1;
I got the following error when I assign drFoundRows[0]["Some Column"] to 1.
Exception Type: System.NullReferenceException Exception Message: Object
reference not set to an instance of an object.
Exception Source: System.Data
Exception TargetSite: Void RecordStateChanged(Int32,
System.Data.DataViewRowState, System.Data.DataViewRowState, Int32,
System.Data.DataViewRowState, System.Data.DataViewRowState)
StackTrace Information
****************************************************
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.EndEdit()
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRow.set_Item(String columnName, Object value)
at RMQuotes.EditQuote.btAdd_Click(Object sender, EventArgs e)
I checked the drFoundRows[0]["Some Column"] have some integer value before I
made an assignment. This error never happened on some of my PCs (on my
development and one of the production server) and unpredictable happened on
others. My system is Windows 2003 server (without SP1), MDAC 2.8.
Thanks,
Dmitri
I have a very strange error.
string strFilter = "some filter expression";
drFoundRows = m_dsQuote.Tables["Some Table Name"].Select(strFilter);
if(1 != drFoundRows.Length)
{
return;
}
drFoundRows[0]["Some Column"] = 1;
I got the following error when I assign drFoundRows[0]["Some Column"] to 1.
Exception Type: System.NullReferenceException Exception Message: Object
reference not set to an instance of an object.
Exception Source: System.Data
Exception TargetSite: Void RecordStateChanged(Int32,
System.Data.DataViewRowState, System.Data.DataViewRowState, Int32,
System.Data.DataViewRowState, System.Data.DataViewRowState)
StackTrace Information
****************************************************
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.EndEdit()
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRow.set_Item(String columnName, Object value)
at RMQuotes.EditQuote.btAdd_Click(Object sender, EventArgs e)
I checked the drFoundRows[0]["Some Column"] have some integer value before I
made an assignment. This error never happened on some of my PCs (on my
development and one of the production server) and unpredictable happened on
others. My system is Windows 2003 server (without SP1), MDAC 2.8.
Thanks,
Dmitri