Subject Re: Multiple field ordering
Author stanw1950
The big difference is that you do not need to code a change of order.
In other words you do not need to do:
query.sql.clear;
query.sql.add('select...');
query.sql.add('order by ...');
every time your sort order needs to change (maybe by the user
clicking on a radio group item).

Setting this up in the ordering items and ordering links of the query
allows the user just to click on the grid title, if you set up the
grid that way. You can also change programmatically by changing the
orderingitemno property of the grid. This is a lot easier than then
directly changing the sql each time. And since you can have multiple
fields (partnumber,color), this feature is more powerful.

Hope this helps.
Stan Walker


--- In IBObjects@y..., "pepmallorca" <pepmallorca@y...> wrote:
> --- In IBObjects@y..., "Kaputnik" <delphi@k...> wrote:
> > Try this:
> >
> > Pn=PARTNUMBER,COLOR
> >
> > this should sort the dataset with a multiple orderin-by clause
> >
>
> Hello:
>
> Can I ask about the difference to use: Pn=PARTNUMBER,COLOR
>
> and include the clause ORDER BY PARTNUMBER,COLOR
> in the code of the SQL select.
>
> What's better?
>
> Thanks,