Re: MS SQL and NSTimestamp.DistantFuture
Re: MS SQL and NSTimestamp.DistantFuture
- Subject: Re: MS SQL and NSTimestamp.DistantFuture
- From: Chuck Hill <email@hidden>
- Date: Fri, 18 Apr 2008 10:33:28 -0700
On Apr 18, 2008, at 1:22 AM, David Avendasora wrote:
I ended up implementing my own "DistantFuture" method in my Utility
class. Not the greatest, but it works like a charm.
I can't believe that Chuck hasn't come up with a fix for this MS SQL
"shortcoming". He's fixed so many others.
Slacker. He probably can't.
I can, but it is too easy so I don't want to. :-P That and I don't
use DistantFuture.
Chuck
On Apr 17, 2008, at 10:37 PM, Lachlan Deck wrote:
On 18/04/2008, at 1:45 AM, David Avendasora wrote:
Apparently MS SQL Server does not like the value
NSTimestamp.DistantFuture tries to send to the database.
After capturing the exact SQL and trying it out using Aqua Data
Studio, I get the following error: "Syntax error converting
datetime from character string."
The value it is trying to use is: '292278994-08-17 02:12:55'
MS SQL doesn't like anything more than a 4-digit year.
Don't tell me we learnt nothing from the y2k bug... and it's now a
y10k bug ;-)
I suppose I could just not use NSTimestamp.DistantFuture, and pass
a date like '9999-12-31 23:59:59' or something. Any better
suggestions for a work-around?
Perhaps you could override your setters (via velocity) to call some
transformFunction that'll round down a few years for mysql?
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden