This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We're using SqlServer2005 as the DataProvider, and trying to store SqlDateTime.MaxValue to the db but it is impossible because SqlDateTime.MaxValue is bigger than: private static readonly DateTime _maximumDateTime = new DateTime(9999, 12, 31, 23, 59, 59); (found on line 19 in DataProviderAdapter.cs) Is this deliberate or just remains from old code? |
|
|
This is the .NET Framework DateTime.MaxValue. (Well, minus 0.999999... seconds, which might be the source of the issue.) If you are representing your date-time values as DateTime, you can't represent a date-time higher than this anyway (again, modulo fractions of a second). If you represent your date-time values as SqlDateTime, then they don't participate in DateTime validation, so this shouldn't affect you anyway. If you need us to fix the "last 0.99999... seconds" thing, let us know. |
|
|
Yes, that was what I was aiming for, because without those 0.999... seconds. It's impossible to use SqlDateTime.MaxValue as "indefinetly" when having expiry-dates (for instance). We have to subtract the 0.9999... seconds from MaxValue every time, or just subtract one second, but it's not the way it should be :) So, please fix this, and I guess it'll be in the next nightly?
|
|
|
Okay, this will be in the 25 Sept nightly. Some databases don't support DateTime.MaxValue (I'm looking at you, SQL CE) and for these databases we will continue to validate to 1 second before midnight as we do at the moment. |
|