Subject Re: [IBO] IB_Query Ordering Problems
Author kj01135
Thanks Paul, I will try this one out. By the way, do you know how
to do the same thing using SQLOrder? I do the same thing as shown in
GSG but without using the SQLWhereItems and I always get the Invalid
Token Error.

Regards,
Kenneth Man

> If you know beforehand that your program will use a limited number
of
> orderings, it's best to define them as OrderingItems at design time
> (although you can also define them programmatically at runtime).
>
> Multiple-column orderings are OK too. E.g. in one of my projects I
> have OrderingItems:
>
> Docent=4;4 DESC
> Per.=PERIODE;PERIODE DESC
> Aangemaakt=AANGEMAAKT;AANGEMAAKT DESC
> Uitgezet=UITGEZET;UITGEZET DESC
> OK=DOCENT_AKKOORD,PERIODE;DOCENT_AKKOORD DESC,PERIODE DESC
>
> Notice that the last one orders on two columns. But more is also
> possible. I often let the Query Editor autocreate the
OrderingItems,
> and then I finetune them: remove some, edit some (e.g. to add
fields)
> etc.
>
> The corresponding OrderingLinks (for grid column ordering) are
simply:
>
> DOCENTNAAM=ITEM=1
> PERIODE=ITEM=2
> AANGEMAAKT=ITEM=3
> UITGEZET=ITEM=4
> DOCENT_AKKOORD=ITEM=5
>
> Now, if the user clicks on the column header of the DOCENT_AKKOORD
> column in the grid (the header caption is: OK), the query (and
> therefore the grid) will be ordered on the TWO columns
DOCENT_AKKOORD
> and PERIODE.
>
> Of course you can also change the ordering at runtime by assigning
the
> TIB_Query.OrderingItemNo
>
>
> Greetings,
> Paul Vinkenoog