I'm not able to get SortedFields to work at run-time. It is working at design time. Is this a bug! Any reason this could happen? The query doesn't have "Order By", and I'm storing the field name in SortedFields property with SortType set to stAscending.
It was working fine in 6.5
thanks
SortedFields at runtime
Moderators: EgonHugeist, mdaems
-
- Senior Boarder
- Posts: 50
- Joined: 31.08.2006, 10:41
- Contact:
[quote="bangfauzan"]Try to reset your such properties, and run again.
Make sure that the first thing you do is setting sorttype property,
then sortedfields.[/quote]
I think this requirement (to set something in a certain order) is a bad behaviour! Either both should be set at once (one function call) OR the order of function call should be irrelevant.
Neither setting sorttype should change sortedfields and vice versa. Let the developer make/find his errors by setting WRONG sortings, but do not HIDE the errors by making hidden setting changes.
Plamen
Make sure that the first thing you do is setting sorttype property,
then sortedfields.[/quote]
I think this requirement (to set something in a certain order) is a bad behaviour! Either both should be set at once (one function call) OR the order of function call should be irrelevant.
Neither setting sorttype should change sortedfields and vice versa. Let the developer make/find his errors by setting WRONG sortings, but do not HIDE the errors by making hidden setting changes.
Plamen
To close this strange matter until further investigation.
The problem was in the line:
So whenever I do a SortedFields assignment I also assign the same value to the IndexFieldNames property too.
Thanks
The problem was in the line:
Code: Select all
If FIndexFieldNames = '' then exit;
Thanks