Subject | Re: [IBO] Collated and parameterised query |
---|---|
Author | Helen Borrie |
Post date | 2003-09-28T11:14:02Z |
At 09:14 AM 28/09/2003 +0000, you wrote:
collation is valid for the character set of the column. I have never heard
of a collation name PXW_1254, though. Where did it come from?
parameter before opening the query...
...
if not TheQuery.Prepared then
TheQuery.Prepare;
TheQuery.ParamByName('CUSTNO').AsInteger := SomeConstantValue;
TheQuery.Open;
...
You have to set up OrderingItems and OrderingLinks.
OrderingItems:
Customer Name=CNAME[;CNAME desc] // orderingitem 1
C.. Area=CAREA[;CAREA desc] //orderingitem 2
You can optionally use the additions in square brackets if you have both
asc and desc indexes on the column (omit the brackets, of course!!)
OrderingLinks
CNAME=ITEM=1
CAREA=ITEM=2
In grids you will see small glyphs in the column titles - pointing upward
if the ascending sort order is active, downward if the descending order is
active. Clicking on the column title causes the set to be requeried with
the appropriate ORDER BY clause added.
More info about these properties - READ THE HELP.
Helen
>Thank you for your help in the past.You can add the COLLATE extension to the ORDER BY clause, provided the
>Please could You help me ?
>Thank You in advance...
>
>** Fist Question:
>My Query is:
>SELECT * FROM CUSTOMERS ORDER BY NAME COLLATE PXW_1254.
>
>I set up the query as SELECT * FROM CUSTOMER on SOL.SOL Tab.
>I create the order definition as on SQL.Ordering Tab.
>
>Where is the best place to add "COLLATE PXW_1254" and how ?
collation is valid for the character set of the column. I have never heard
of a collation name PXW_1254, though. Where did it come from?
>** Second Question:Should be ..WHERE CUSTNO = :CUSTNO
>I have parameterized query:
>SELECT * FROM CUSTOMERS WHERE CUSTNO :CUSTNO
>And I have two sorting fields CNAME, CAREA .For the parameterised query, you need to pass a value to the :custno
>Query works.
>
>After I cliked the title of field for sorting, Query appers empty.
>I checked parameters. Paremeters are empty too.
>How can I set up parameterised&sortable query ?
parameter before opening the query...
...
if not TheQuery.Prepared then
TheQuery.Prepare;
TheQuery.ParamByName('CUSTNO').AsInteger := SomeConstantValue;
TheQuery.Open;
...
You have to set up OrderingItems and OrderingLinks.
OrderingItems:
Customer Name=CNAME[;CNAME desc] // orderingitem 1
C.. Area=CAREA[;CAREA desc] //orderingitem 2
You can optionally use the additions in square brackets if you have both
asc and desc indexes on the column (omit the brackets, of course!!)
OrderingLinks
CNAME=ITEM=1
CAREA=ITEM=2
In grids you will see small glyphs in the column titles - pointing upward
if the ascending sort order is active, downward if the descending order is
active. Clicking on the column title causes the set to be requeried with
the appropriate ORDER BY clause added.
More info about these properties - READ THE HELP.
Helen