RefreshQuick Problem
Posted: Wed 25 Aug 2010 06:32
RefreshQuick has serveral problems when there are more than 1 timestamp fields in a table.
For example, if I got 2 timestamp fields, 1 default to CURRENT_TIMESTAMP and the other default to null, which store some expiring Timing which is usually 1,2 days AFTER current date.
From what I observed,
1. TMyQuery pick the first encountered timestamp field to put in the where clause when doing RefreshQuick. So, I put my real timestamp field at the begining of the field list.
2. TMyQuery pick the largest datetime value from ALL timestamp field rather then the selected timestamp field. As the 2nd timestamp field store value for future, the RefreshQuick function just don't work as they cannot find records modified after the last load.
What I think is TMyQuery should pick the timestamp field which default to CURRENT_TIMESTAMP and only get largest datetime from THAT field.
I know I can use datetime to prevent it, but it take double space in field and index and sort slower.
Please let me know if this will be improved or the behaviour should act like current for some reasons I cannot think of. So, I can decide whether I need to choose between giving up refreshquick or change those extra fields to datetime type.
Thanks in advance for your knid help.
Justmade
For example, if I got 2 timestamp fields, 1 default to CURRENT_TIMESTAMP and the other default to null, which store some expiring Timing which is usually 1,2 days AFTER current date.
From what I observed,
1. TMyQuery pick the first encountered timestamp field to put in the where clause when doing RefreshQuick. So, I put my real timestamp field at the begining of the field list.
2. TMyQuery pick the largest datetime value from ALL timestamp field rather then the selected timestamp field. As the 2nd timestamp field store value for future, the RefreshQuick function just don't work as they cannot find records modified after the last load.
What I think is TMyQuery should pick the timestamp field which default to CURRENT_TIMESTAMP and only get largest datetime from THAT field.
I know I can use datetime to prevent it, but it take double space in field and index and sort slower.
Please let me know if this will be improved or the behaviour should act like current for some reasons I cannot think of. So, I can decide whether I need to choose between giving up refreshquick or change those extra fields to datetime type.
Thanks in advance for your knid help.
Justmade