1/1/1800 keeps showing up...


Author
Message
StarkMike
StarkMike
StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)StrataFrame User (498 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have a date field in a BO that i have set to Do Not Allow Nulls... I do not have a default value specified for the field in the table. I have tried it both with the StrataFrame datepicker and the DevExpress wrapped DateEdit and when I click New it puts 1/1/1800 in the date field. I cant find where it's doing that... any suggestions?
StrataFrame Team
S
StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)StrataFrame Developer (4.4K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
It's doing it when you call NewRow() on the business object.  All of the fields within the row are initialized to blank values, which for a date, is 1/1/1800.  You can either set the AllowNullValuesOnNewRows property on the BO to false, and all of the fields will be left with DBNull.Value, or you can set the column to DBNull.Value in the SetDefaultValues() method of the business object (then, the default value of the DB will be used when the records is INSERTed). 
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search