I've tried hardcoding the values to be DateTime.MinValue, and I still get the same error. I am using the OleDB provider.
Rahul On Thu, 30 Dec 2004 18:53:15 -0500, Ted Husted <[EMAIL PROTECTED]> wrote: > Actually, I've never seen an arithmetic overflow error before. > > Is it possible that your timer values are going past DateTime.MaxValue ? > > -Ted. > > On Thu, 30 Dec 2004 17:37:52 -0500, Rahul Singh wrote: > > Ted, > > > > I think i know where you are coming from, but let's say I have this > > representing my properties in my model, what changes would you make > > to make this work? I think I may be having a senile moment, but i'd > > greatly appreciate your help. > > > > Rahul > > > > " > > protected DateTime _lastTimerStart; > > protected DateTime _lastTimerStop; > > > > public DateTime LastTimerStart > > { > > get {return _lastTimerStart;} > > set {_lastTimerStart = value;} > > } > > > > public DateTime LastTimerStop > > { > > get {return _lastTimerStop;} > > set {_lastTimerStop = value;} > > }" > > > > > > On Thu, 30 Dec 2004 07:21:02 -0500, Ted Husted <[EMAIL PROTECTED]> > > wrote: > > > >> On Wed, 29 Dec 2004 17:17:49 -0500, Rahul Singh wrote: > >> > >>> "The statement has been terminated. Arithmetic overflow error > >>> converting expression to data type datetime. " > >>> > >>> How do you guys deal with DateTime values as your object > >>> properties? I'm getting this error when I try to insert the > >>> object. > >>> > >>> Rahul > >>> > >> At the moment, I have the model object convert the value back and > >> forth between a string representation and a binary > >> representation. The model object has a separate property for the > >> string representation that do the conversion and pass the binary > >> to the actual Date property. (So there is no private string > >> field, just the binary.) The data access methods use the binary > >> property. The controls use the string property. The string > >> methods also watch for the magic null strings, and return blanks > >> to the controls. > >> > >> Next, I'm going to refactor for the Spring Framework, which I > >> believe has a lot of conversion utilities built in. Spring is > >> widely used by the Java community, and I expect we'll find the > >> same on the .NET side soon. > >> > >> [http://www.springframework.net/] > >> > >> -Ted. > >