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.