| | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 1:32:21 PM Posts: 368, Visits: 1,854 |
| Don’t know if it has already been suggested but I’d like to see the BrowseDialog search criteria support a DatePicker control for date fields. -Larry |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 1:32:21 PM Posts: 368, Visits: 1,854 |
| Now that's what I call service. Just think of an enhancement and it's there. (Sorry to bother you guys, I didn't realize you had already added support for DatePicker) |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 1:32:21 PM Posts: 368, Visits: 1,854 |
| Now that I’ve had a chance to use DatePicker in the BrowseDialog it I’ve run into a problem. Any search for a date Equal to the date selected in DatePicker fails to return any records even though they exist in the data base. I’m assuming the probable cause is that the time portion of the date/time field is not being handled correctly to allow a comparison of the dates only. -Larry |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: 10/21/2008 9:20:58 AM Posts: 2,685, Visits: 1,887 |
| Hrm... that's strange. I'll check into that and see if there is something I can come up with. However, if the dates in the database all have a time attached to them, then there might not be much I can do, but I will check.
www.bungie.net |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 1:32:21 PM Posts: 368, Visits: 1,854 |
|
In SQL server any date stored as type DateTime or SmallDateTime is going to have a time component so you would need to eliminate it to search for a date equal to a specified date. One way to do that would be to use a select statement similar to the following SELECT * FROM [Table] WHERE CONVERT(Char(10),[DateTimeColumn],101) =@SearchDate If you were using a DateTimePicker to specify the search date, your search parameter would be something like @SearchDate = String.Format(“{0:MM/dd/yyyy}”, DateTimePicker.value) Another possibility I considered was adding a computed column (DateOnly) to my table. It would be defined as CONVERT(Char(10),[DateTimeColumn],101) I could then search on this in the BrowseDialog as text field by entering my search date in mm/dd/yyyy format. Some problems with this approach are that >, < searches wouldn’t work and the Database Deployment Toolkit does not support computed fields which means I would have to modify the database after deploying it. I would also have to use the database and not DDT in ObjectMapper. Regardless on whether or not you can fix this in the framework I suggest adding a “Between” for DateTime fields and displaying two DateTimePikcers for beginning and ending dates when selected Most of the time, my users are looking for a specific date or a date that falls within a date range. -Larry |
| | | | 
StrataFrame Developer

Group: StrataFrame Developers Last Login: Yesterday @ 5:04:58 PM Posts: 4,780, Visits: 4,744 |
| | I will look into this. Thanks. |
| | | | 
StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 1:32:21 PM Posts: 368, Visits: 1,854 |
| Another problem I found with the “computed column” approach is that even if it’s defined as a ReadOnly field in ObjectMapper the framework wants to update it on a Save and since you can’t insert or update a computed column you get an exception. I saw in another post that preventing the framework from trying to save all mapped fields would require a lot of work so this would likely be difficult to fix. When I was considering this approach I had assumed that marking a field as ReadOnly prevented the framework from trying to update the DB. -Larry |
| | | | StrataFrame Beginner
       
Group: Forum Members Last Login: 02/07/2007 8:38:12 AM Posts: 11, Visits: 57 |
| | Here's another vote for a "between" option for searches, but for other types as well, e.g.: any numeric type, character strings, etc. It would look a lot better than having two lines in the search: "Distance between xxxx and xxxx" It would also be nice if the BrowseDialog optimized this as appropriate for >=, <= or = when appropriate. |
| | | | StrataFrame User
       
Group: StrataFrame Users Last Login: Yesterday @ 7:07:00 AM Posts: 462, Visits: 1,722 |
| | I also need "between" range search feature. Has it been implemented? If not, any workaround? Thank you |
| |
|
|