A few things come to my mind, but they are not that helpful if the error only happens sometimes:
- in Visual Studio you can add breakpoints to exceptions. Look at Debug>Exceptions and add the exception. - is there an inner exception ? The error sounds like you somewhere have a type mismatch between your mapping and your column definition. I suggest you check all mapping files which are related to the insert. -- Wolfgang -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of DanVan Sent: Mittwoch, 22. April 2009 00:04 To: nhusers Subject: [nhusers] Tracking down a save error I am calling Save on an nHibernate object that has many children attached to it. Upon save, sometimes an error happens when nHibernate starts inserting into my sql database ("The data was truncated while converting from one data type to another." for instance). Following are the top lines of the Exception. My question is, how do I figure out which table/column is the culprit within my save error? at System.Data.SqlServerCe.SqlCeCommand.ProcessResults(Int32 hr) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommandText(IntPtr& pCursor, Boolean& isBaseTableCursor) at System.Data.SqlServerCe.SqlCeCommand.ExecuteCommand (CommandBehavior behavior, String method, ResultSetOptions options) at System.Data.SqlServerCe.SqlCeCommand.ExecuteNonQuery() at NHibernate.AdoNet.AbstractBatcher.ExecuteNonQuery(IDbCommand cmd) at NHibernate.Id.Insert.AbstractSelectingDelegate.PerformInsert (SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object [] fields, Boolean[] notNull, SqlCommandInfo sql, Object obj, ISessionImplementor session) at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object [] fields, Object obj, ISessionImplementor session) at NHibernate.Action.EntityIdentityInsertAction.Execute() --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
