L
Lee Gillie
DataGrid is throwing up a message box when I change any value in any
row, and then move to some other row. I see this box: "Error when
committing the row to the original data store. Object reference not set
to an instance of an object. Do you want to correct the value?"
Prior to the message box, I trap this exception:
"A first chance exception of type 'System.NullReferenceException'
occurred in system.data.dll
Additional information: Object reference not set to an instance of an
object."
At the point the exception occurs, the stack looks like this:
system.data.dll!System.Data.DataTable.RecordStateChanged(int record1 =
3, System.Data.DataViewRowState oldState1 = Added,
System.Data.DataViewRowState newState1 = None, int record2 = 2,
System.Data.DataViewRowState oldState2 = None,
System.Data.DataViewRowState newState2 = Added) + 0x61 bytes
system.data.dll!System.Data.DataTable.SetNewRecord(System.Data.DataRow
row = {System.Data.DataRow}, int proposedRecord = 2,
System.Data.DataRowAction action = Change, bool isInMerge = false) +
0x230 bytes
system.data.dll!System.Data.DataRow.SetNewRecord(int record = 2) +
0x26 bytes
system.data.dll!System.Data.DataRow.EndEdit() + 0x3d bytes
system.data.dll!System.Data.DataRowView.EndEdit() + 0x35 bytes
system.windows.forms.dll!System.Windows.Forms.CurrencyManager.EndCurrentEdit()
+ 0x76 bytes
system.windows.forms.dll!System.Windows.Forms.DataGrid.set_CurrentCell(System.Windows.Forms.DataGridCell
value = {System.Windows.Forms.DataGridCell}) + 0x48f bytes
system.windows.forms.dll!System.Windows.Forms.DataGrid.OnMouseDown(System.Windows.Forms.MouseEventArgs
e = {X=70 Y=46 Button=Left}) + 0x89d bytes
system.windows.forms.dll!System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}, System.Windows.Forms.MouseButtons
button = Left, int clicks = 1) + 0x14b bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x484 bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 329874, int msg = 513, int wparam = 1, int lparam = 3014726) +
0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int
reason = -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason =
-1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {ODP.PPS.PPSTables.frmClients}) + 0x34 bytes
I looked at RecordStateChanged in REFLECTOR but could not see what may
be causing the exception.
Been trying all sorts of things to diagnose this, but having little luck.
Any ideas??
row, and then move to some other row. I see this box: "Error when
committing the row to the original data store. Object reference not set
to an instance of an object. Do you want to correct the value?"
Prior to the message box, I trap this exception:
"A first chance exception of type 'System.NullReferenceException'
occurred in system.data.dll
Additional information: Object reference not set to an instance of an
object."
At the point the exception occurs, the stack looks like this:
system.data.dll!System.Data.DataTable.RecordStateChanged(int record1 =
3, System.Data.DataViewRowState oldState1 = Added,
System.Data.DataViewRowState newState1 = None, int record2 = 2,
System.Data.DataViewRowState oldState2 = None,
System.Data.DataViewRowState newState2 = Added) + 0x61 bytes
system.data.dll!System.Data.DataTable.SetNewRecord(System.Data.DataRow
row = {System.Data.DataRow}, int proposedRecord = 2,
System.Data.DataRowAction action = Change, bool isInMerge = false) +
0x230 bytes
system.data.dll!System.Data.DataRow.SetNewRecord(int record = 2) +
0x26 bytes
system.data.dll!System.Data.DataRow.EndEdit() + 0x3d bytes
system.data.dll!System.Data.DataRowView.EndEdit() + 0x35 bytes
system.windows.forms.dll!System.Windows.Forms.CurrencyManager.EndCurrentEdit()
+ 0x76 bytes
system.windows.forms.dll!System.Windows.Forms.DataGrid.set_CurrentCell(System.Windows.Forms.DataGridCell
value = {System.Windows.Forms.DataGridCell}) + 0x48f bytes
system.windows.forms.dll!System.Windows.Forms.DataGrid.OnMouseDown(System.Windows.Forms.MouseEventArgs
e = {X=70 Y=46 Button=Left}) + 0x89d bytes
system.windows.forms.dll!System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}, System.Windows.Forms.MouseButtons
button = Left, int clicks = 1) + 0x14b bytes
system.windows.forms.dll!System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x484 bytes
system.windows.forms.dll!ControlNativeWindow.OnMessage(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0x13 bytes
system.windows.forms.dll!ControlNativeWindow.WndProc(System.Windows.Forms.Message
m = {System.Windows.Forms.Message}) + 0xda bytes
system.windows.forms.dll!System.Windows.Forms.NativeWindow.DebuggableCallback(int
hWnd = 329874, int msg = 513, int wparam = 1, int lparam = 3014726) +
0x3d bytes
system.windows.forms.dll!System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(int
dwComponentID = 1, int reason = -1, int pvLoopData = 0) + 0x349 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoopInner(int
reason = -1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x1f3 bytes
system.windows.forms.dll!ThreadContext.RunMessageLoop(int reason =
-1, System.Windows.Forms.ApplicationContext context =
{System.Windows.Forms.ApplicationContext}) + 0x50 bytes
system.windows.forms.dll!System.Windows.Forms.Application.Run(System.Windows.Forms.Form
mainForm = {ODP.PPS.PPSTables.frmClients}) + 0x34 bytes
bytes BasicPPSTablesEditor.exe!PPSTablesEditor.Main.Main() Line 24 + 0x10
I looked at RecordStateChanged in REFLECTOR but could not see what may
be causing the exception.
Been trying all sorts of things to diagnose this, but having little luck.
Any ideas??