Thanks for answering. Below is all of the data that I could provide. I have a form with an SF BO. The user clicks new, enters data, then clicks save. Normal, so far. The save routine (not extended by me in any way) detects that the date on the form is invalid (MicroFour.StrataFrame.Data.DataLayerSavingException: SqlDateTime overflow). An exception occurs and is reported to the form. Since it is not handled, the exception gets bubbled up to the program.cs and is handled there. Four times, the exact same inner exception and stack trace are reported:
Inner Exception: MicroFour.StrataFrame.Data.DataLayerSavingException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. ---> System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(TimeSpan value)
at System.Data.SqlTypes.SqlDateTime.FromDateTime(DateTime value)
at System.Data.SqlTypes.SqlDateTime..ctor(DateTime value)
at System.Data.SqlClient.MetaType.FromDateTime(DateTime dateTime, Byte cb)
at System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_SqlRPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.ExecuteReader()
at MicroFour.StrataFrame.Data.DbDataSourceItem.InternalExecuteReader(DbCommand Command, Boolean IsTransactional, String TransactionKey)
at MicroFour.StrataFrame.Data.SqlDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler, Boolean RecreateCommand)
at MicroFour.StrataFrame.Data.DbDataSourceItem.UpdateRow(QueryInformation QueryInfo, DataRow RowToUpdate, ConcurrencyExceptionHandler ConcurrencyHandler, AddRowErrorHandler RowErrorHandler)
at MicroFour.StrataFrame.Data.DataLayer.UpdateDataTableThread(Object ThreadParams)
--- End of inner exception stack trace ---
at MicroFour.StrataFrame.Data.DataLayer.SaveByForm(DataTable TableToSave, Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
The stack trace is the same, too:
Stack Trace: at MicroFour.StrataFrame.Business.BusinessLayer.SaveByForm(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save(Boolean Transactional, String TransactionKey)
at MicroFour.StrataFrame.UI.Windows.Forms.BaseForm.Save()
at MicroFour.StrataFrame.UI.Windows.Forms.MaintenanceFormToolStrip.cmdSave_Click(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Here is my UnhandledExceptionFound method:
private static void UnhandledExceptionFound(UnhandledExceptionFoundEventArgs e)
{
e.Handled = true;
String mUserData = "No additional user information has been supplied.";
Aspire.SF.SPXExceptionData mNewForm = new Aspire.SF.SPXExceptionData(e.UnhandledException);
if (mNewForm.ShowDialog() == DialogResult.OK)
{
mUserData = mNewForm._userinfo;
}
String mVersionString = "";
if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed)
{
System.Deployment.Application.ApplicationDeployment ad = System.Deployment.Application.ApplicationDeployment.CurrentDeployment;
mVersionString = ad.CurrentVersion.ToString();
}
else
{
mVersionString = "-: Debugging Mode :-";
}
MailMessage mMail = new MailMessage();
SmtpClient mSmtp = new SmtpClient("MailServer");
Aspire.Model.UserBO mUser = new Aspire.Model.UserBO();
mUser.FillByPrimaryKey(SecurityBasics.CurrentUser.UserPK);
mMail.From = new MailAddress(mUser.EmailAddress, mUser.FullName);
mMail.To.Add(ourhelpdeskemailaddress@spiratex.com);
mMail.Subject = "Aspire v3.5 :: Unhandled Exception Report";
mMail.Body = "User Information: " + mUserData + "\r" + "\r";
mMail.Body += "Version: " + mVersionString + "\r" + "\r";
mMail.Body += "Message: " + e.UnhandledException.Message + "\r" + "\r";
mMail.Body += "Source: " + e.UnhandledException.Source + "\r" + "\r";
mMail.Body += "Inner Exception: " + e.UnhandledException.InnerException + "\r" + "\r";
mMail.Body += "Stack Trace: " + e.UnhandledException.StackTrace;
mSmtp.Send(mMail);
}If you could tell me where I am making this error report repeat itself, I would really appreciate it. Thanks!
Bill