Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > LINQ
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
LINQ Discuss Microsoft's LINQ (Language INtegrated Query) for .NET 3.0 and later.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the LINQ section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old September 10th, 2009, 03:55 AM
Registered User
Join Date: Sep 2009
Location: Philippines
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Strange SqlDateTime overflows occurs Linq SubmitChanges()


I am running out of ideas to locate source or how to replicate error in local pc what is happens 9 times in live site. We are logging errors occurred in the site, and for 9 times it has this error "sqldatetime overflow", strange is only occurs 9 times and not always, tested it in local pc and dev server, this error don't and never occurred...I checked the codes, twice in the codes CrDate (Not Nullable) is being set to DateTime.Now during insert/add process and ModDate (Nullable) is being also to DateTime.Now during update/edit process... In table structure, CrDate is set wth default to getdate() and ModDate allows null and no default value...

So why these errors occurs? How can I replicate errors or explanation as to why this happens and how to fixed it? Would setting Auto Generate Values property for CrDate to true would definitely prevent re-occurrence of this error???

Recorded/Logged Error:

at System.Data.SqlTypes.SqlDateTime.FromTimeSpan(Time Span value) at System.Data.SqlTypes.SqlDateTime.FromDateTime(Date Time value) at System.Data.SqlClient.MetaType.FromDateTime(DateTi me dateTime, Byte cb) at System.Data.SqlClient.TdsParser.WriteValue(Object value, MetaType type, Byte scale, Int32 actualLength, Int32 encodingByteSize, Int32 offset, TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.TdsExecuteRPC(_Sql RPC[] rpcArray, Int32 timeout, Boolean inSchema, SqlNotificationRequest notificationRequest, TdsParserStateObject stateObj, Boolean isCommandProc) at System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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(Com mandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteDbDataRead er(CommandBehavior behavior) at System.Data.Common.DbCommand.ExecuteReader() at System.Data.Linq.SqlClient.SqlProvider.Execute(Exp ression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll( Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) at System.Data.Linq.SqlClient.SqlProvider.System.Data .Linq.Provider.IProvider.Execute(Expression query) at System.Data.Linq.ChangeDirector.StandardChangeDire ctor.DynamicInsert(TrackedObject item) at System.Data.Linq.ChangeDirector.StandardChangeDire ctor.Insert(TrackedObject item) at System.Data.Linq.ChangeProcessor.SubmitChanges(Con flictMode failureMode) at System.Data.Linq.DataContext.SubmitChanges(Conflic tMode failureMode) at System.Data.Linq.DataContext.SubmitChanges() at CoreLib.Services.KRAService.Save(Int32 kraCategoryId, Int32 employeeSBUId, List`1 KRAs, KRAStatus status) in E:\[Omitted]\CoreLib\Services\KRAService.cs:line 156 at [Omitted].Save(Int32 categoryId, Int32 employeeSBUId, List`1 KRAs, Boolean redirect, KRAStatus status) in E:\[Omitted]\changenameclass.cs:line 276 at [Omitted].Views.DefaultViewPresenter.SaveData(Int32 categoryId, Int32 employeeSBUId, DataTable dt, Boolean redirect, KRAStatus status) in E:\[Omitted]\DefaultViewPresenter.cs:line 852 at [Omitted].SaveAllKRAs(Object sender, EventArgs e, Boolean redirect) in E:\[Omitted]\WebSites\[Omitted]\Default.aspx.cs:line 501 at [Omitted].Save(Object sender, EventArgs e) in E:\[Omitted]\WebSites\[Omitted]\Default.aspx.cs:line 242 at [Omitted].Shell.MasterPages.DefaultMaster.MainMenu_Click(Ob ject sender, EventArgs e) in E:\[Omitted]\WebSites\[Omitted]\Shared\DefaultMaster.master.cs:line 298 at System.Web.UI.WebControls.LinkButton.OnClick(Event Args e) at System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to Log When Edit Occurs in Gridview JB4375 BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 0 April 15th, 2009 10:10 AM
SqlDateTime overflow Will ASP.NET 3.5 Basics 9 April 6th, 2009 03:28 PM
How to handle error or exception if it occurs popoxinhxan BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 August 27th, 2006 06:44 PM
urgent: session timeout occurs unexpectedly seemagaur ASP.NET 1.0 and 1.1 Basics 0 October 10th, 2005 12:59 PM
How to know when an exception occurs? ecobo C# 2 December 30th, 2004 03:05 AM

All times are GMT -4. The time now is 04:37 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.