Hello there!
I was building an program that uses zeos with the latest version due to some changes that costumer asked to me and one simple problem pop up:
I know that IndexFieldNames was changed some time ago. It doesn't matter to me, as I don't use it. But in this old program (that was converted from BDE, and used IndexFieldNames in the past), I may forgot some IndexFieldNames filled up. Doesn't matter too, becouse I've never had any problems. But with the new version, there is a problem. The IndexFieldNames was self completed with an 'Asc' (from Ascending) after the fields definitions, and, the big problem, a while not query.eof construction became an infinite loop. Removed the IndexFieldNames property (leave it blank) and everything works again.
Look to me that every time that the ZQuery Recevied the .Next command, it tries to reorder the data, and take the position of cursor to BOF (the first record), as my loop always stop in the second row.
Anyone with the same problem? It's not a * problem * at all, as I've resolved it removing the property values. But may become a problem for anyone that may use it.
[]'s
A problem with the new IndexFieldNames / SortedFields
Moderators: gto, cipto_kh, EgonHugeist
-
- Senior Boarder
- Posts: 50
- Joined: 31.08.2006, 10:41
- Contact:
Hi, gto
The purpose of the new IndexFieldNames is for sorting only, as combination of the new behavior of SortedFieldNames and SortType.
If u converted from BDE that use IndexFieldNames, you now can use LinkedFields (as master detail relationship). LinkedFields has the same behavior as old IndexFieldNames.
Conclusion:
- the old IndexFieldNames was replaced by LinkedFields, so LinkedFields is similar (or equal) with IndexFieldNames in other standard components.
- the new IndexFieldNames is another way in performing order.
Regards
Fauzan
The purpose of the new IndexFieldNames is for sorting only, as combination of the new behavior of SortedFieldNames and SortType.
If u converted from BDE that use IndexFieldNames, you now can use LinkedFields (as master detail relationship). LinkedFields has the same behavior as old IndexFieldNames.
Conclusion:
- the old IndexFieldNames was replaced by LinkedFields, so LinkedFields is similar (or equal) with IndexFieldNames in other standard components.
- the new IndexFieldNames is another way in performing order.
Regards
Fauzan
-
- Senior Boarder
- Posts: 50
- Joined: 31.08.2006, 10:41
- Contact:
Re: A problem with the new IndexFieldNames / SortedFields
I used this component (6.6.0 beta) in production environment, and everythink ok. Here an example based on your cases. Using Mysql 5 I also attach the database script (contoh.sql). No problem at all.gto wrote:and, the big problem, a while not query.eof construction became an infinite loop.
can u send me the example of your cases please?
regards
Fauzan
You do not have the required permissions to view the files attached to this post.
Sort 2 fields
What about if I want to sort that base on 2 fields, the one is sort asc and the other desc. How to make it work? I mean by using that new property (not using SQL query)
TIA
TIA
bangfauzan wrote:Hi, gto
The purpose of the new IndexFieldNames is for sorting only, as combination of the new behavior of SortedFieldNames and SortType.
If u converted from BDE that use IndexFieldNames, you now can use LinkedFields (as master detail relationship). LinkedFields has the same behavior as old IndexFieldNames.
Conclusion:
- the old IndexFieldNames was replaced by LinkedFields, so LinkedFields is similar (or equal) with IndexFieldNames in other standard components.
- the new IndexFieldNames is another way in performing order.
Regards
Fauzan
-
- Senior Boarder
- Posts: 50
- Joined: 31.08.2006, 10:41
- Contact: