Best practice question on Date columns


Author
Message
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)
Group: Forum Members
Posts: 153, Visits: 462
If we have a BO that has a datetime column that we may at times want to use the date picker against in Strataframe what is the best method of setting the default in the BO Mapper and what is the difference between each method? IE... advantages, etc: FYI I mainly have used the first method which seems to work for SQL and Oracle.

First Setting: NULL VALUE OPTION = Return Alternate on Null / Set Null on Alternate (Value Type) and the NULL REPLACEMENT VALUE = new DateTime(1800, 1, 1)

Second setting:  NULL VALUE OPTION = Return Alernate on Null and the NULL REPLACEMENT VALUE = Convert.ToDateTime("1800-01-01 00:00:00.000")

Replies
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)
Group: Forum Members
Posts: 153, Visits: 462
As an FYI, I did post this question back in 2008 that Ben Chase and Trent responded on: http://forum.strataframe.net/Topic15245-6-1.aspx

 

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I am not entirely sure what you are looking for here different than what you are doing or what was mentioned in the other post.  However, I recommedn using the DateBox now instead of the DateTimePicker (unless you need time entry) as the DateBox was written from the ground up whereas the DateTimePicker inherits from the DateTimePicker from .NET and enhances it.  The DateBox also fully supports the StrataFrame themes, etc and entry on the control is far more flexible and easier to use by end-users.  When we released the DateBox 18 months ago in our medical application, we received a lot of kudos from the end-users as they far preferred the date entry on the DateBox versus the DateTimePicker which is more restrictive and doesn't flow quite as well.
Ross L. Rooker, Sr.
Ross L. Rooker, Sr.
StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)StrataFrame User (245 reputation)
Group: Forum Members
Posts: 153, Visits: 462
My question was not so much on the date picker control but the 2 methods od setting the default in the BO. Is there any difference in the 2 methods illiustrated first above?
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
The first option works two-way meaning that if you set the BO to the default value of 1-1-1800 then a NULL will be set out on disk. Whereas, the second option is one-way meaning that it is a return value only so if it see a value of NULL, it will return the alternate value which in your example would be 1-1-1800. So if you want two way, then you are better off with option 1.
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