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 orches07ation 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 Orches07ation 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
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
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 :)
.
Comments
Post a Comment