SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
AuditTrail audit = new AuditTrail();
audit.UserName =UserName;
audit.UserCode = UserCode;
audit.ActionPerformed = "Logging In";
audit.ModuleName = "Security";
audit.UpdatedTime = DateTime.Now;
using (var tran = db.BeginTransaction())
{
db.Save(audit);
tran.Commit();
}
Its giving Exception: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
I'm stuck with this. Pls Help me.
Support Staff 2 Posted by James Gregory on 28 May, 2010 03:20 PM
See if this helps: NHibernate and the SqlTypeException