hi,
on a specific form i get the nullreference exceptionb below, (only) when i perform the following steps:
1. Delete records, untill none left.
2. Add new record
3. Save new record.
After that i get the exception. However, even tho it sais it could not save the data, by the time it shows the
exception, it has saved the data into the db (without any errors/missing values). When i then close the exception window, everything is fine, i then need to click the save button again, and 1 out of ~3 times, it will then not show the exception.
The Exception i get is the following:
BusinessLayerException
An error occurred while saving an the data to the server.
NullReferenceException
Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
Source : MicroFour StrataFrame Business
Stack Trace:
bei System.Windows.Forms.Binding.SetPropValue(Object value)
bei System.Windows.Forms.Binding.PushData(Boolean force)
bei System.Windows.Forms.BindingManagerBase.PushData(Boolean& success)
bei System.Windows.Forms.BindingManagerBase.PushData()
bei System.Windows.Forms.PropertyManager.OnCurrentChanged(EventArgs ea)
bei System.Windows.Forms.BindToObject.PropValueChanged(Object sender, EventArgs e)
bei MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
bei MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
bei MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
bei MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)
bei System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
bei System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
bei System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
bei System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
bei System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ToolStrip.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
bei System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
as said, it only happens when adding a new record after i deleted all records. and even tho it shows the exception, in theory it does everything right.
So my main question propably is, when do theese events in the businesslayer get triggered:
bei System.Windows.Forms.Binding.SetPropValue(Object value)
bei System.Windows.Forms.Binding.PushData(Boolean force)
bei System.Windows.Forms.BindingManagerBase.PushData(Boolean& success)
bei System.Windows.Forms.BindingManagerBase.PushData()
?