Subject | Re: TIBOQuery OrderingItems Property |
---|---|
Author | Marco Menardi |
Post date | 2002-11-18T22:45:52Z |
If you have a setup like:
LOANACCOUNT=L.LoanNumber, LCA.Account;L.LoanNumber, LCA.Account DESC
NAME=FirstName;FirstName desc
then
OrderingItemNo := 0 -> no ordering to the dataset
OrderingItemNo := 1 -> order by L.LoanNumber, LCA.Account
OrderingItemNo := -1 -> order by L.LoanNumber, LCA.Account desc
OrderingItemNo := 2 -> order by FirstName
OrderingItemNo := -2 -> order by FirstName desc
Using orderingItems let's ibo make it's best to change the less it can
when you change order, avoiding destroing and rebuilding server
resources and reparsing queries, and so on...
So you'd better use them instead of rebuilding the SQL select clause
every time you want to change "order by" part :)
One more suggestions: if you really want to do RAD and unleash the
power of IBO + Firebird, use native components (visual and non
visual). It will take longer to master (and you have to buy Getting
Started Guide), but they are another planet in programming power ;)
regards
Marco Menardi
LOANACCOUNT=L.LoanNumber, LCA.Account;L.LoanNumber, LCA.Account DESC
NAME=FirstName;FirstName desc
then
OrderingItemNo := 0 -> no ordering to the dataset
OrderingItemNo := 1 -> order by L.LoanNumber, LCA.Account
OrderingItemNo := -1 -> order by L.LoanNumber, LCA.Account desc
OrderingItemNo := 2 -> order by FirstName
OrderingItemNo := -2 -> order by FirstName desc
Using orderingItems let's ibo make it's best to change the less it can
when you change order, avoiding destroing and rebuilding server
resources and reparsing queries, and so on...
So you'd better use them instead of rebuilding the SQL select clause
every time you want to change "order by" part :)
One more suggestions: if you really want to do RAD and unleash the
power of IBO + Firebird, use native components (visual and non
visual). It will take longer to master (and you have to buy Getting
Started Guide), but they are another planet in programming power ;)
regards
Marco Menardi
--- In IBObjects@y..., "stevewe2" <stevewe2@y...> wrote:
> Please excuse me if this is a dumb question. I have inherited this
> app and I'm learning IBO from the sky to ground.
>
> TIBOQuery has an OrderingItems property. I have one that is set with
> the following string and similar in the list:
> LOANACCOUNT=L.LoanNumber, LCA.Account;L.LoanNumber, LCA.Account DESC
>
> It looks like the semicolon provides an option to switch from
> ascending to descending order. How is this actually accomplished in
> code?
>
> Steve Weston