Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SqlDateTime Overflow. Must be between 1/1/1753 and 12/31/9999


In current application I have a call to Stored Procedure which updates a table which has some DATETIME column as well. I was testing for various combination and as per test cases all was as expected, except one scenario where my orchestration remained in Started mode itself.  

On seeing the Tracked Message Events, found that message has been sent to SP but no response is received (that's why Orchestration is in started mode).

So, next was to check why there was no response from SP and it was the below errors which made SP to break





Why it happened


As the error says, the date passed against the datetime parameter was out of accepted range. I had set default date to 0001-01-01 but the range starts from 1753-01-01


What to do


I changed the default date to  1900-01-01 00:00:00.000 and all worked fine.


One more thing to do is, to have exception block for SQL exception :) 


.


This post first appeared on TechFindings, please read the originial post: here

Share the post

SqlDateTime Overflow. Must be between 1/1/1753 and 12/31/9999

×

Subscribe to Techfindings

Get updates delivered right to your inbox!

Thank you for your subscription

×