Subject Re: [IBO] Refusal of ordering and searching
Author Helen Borrie
At 05:18 PM 06-08-01 +0200, you wrote:
>I've got a simple one-table-non-joined query which I'd like to order and
>search on.
>
>The query looks like this:
>SELECT
> CUST_ID, NAME, SURNAME, ID_NO, PHONE_H, PHONE_W, PHONE_CELL,
> FAX, PH_ADDR_1, PH_ADDR_2, PH_ADDR_3, PH_ADDR_4, PH_CODE,
> PO_ADDR_1, PO_ADDR_2, PO_ADDR_3, PO_ADDR_4, PO_CODE,
> NOTES
>FROM
> CUSTOMERS
>
>The TIB_Query .OrderingItems property is set to:
>CUST_ID=CUST_ID;CUST_ID DESC
>NAME=NAME;NAME DESC
>
>The OrderingLinks property is set to:
>CUST_ID=1
>NAME=2
>
>The OrderingItemNo property is set to 1.
>
>I've done the sorting of tables plenty times now and for some reason the
>sorting on the most simple query of them all doesn't want to work. What
>other properties do I still need to set? The CUST_ID field is the table's
>primary key. I also have a problem searching through the table but I think
>once the sorting has been sorted out, the searching would also work.


Don,
Just an outside chance -
Does it make a difference if you use another word for the "user-friendly" alias "NAME"? e.g. change the orderingitem entry to
CUSTOMERNAME=NAME;NAME DESC

and the orderinglink to
CUSTOMERNAME=2

NAME is sometimes a tricky word to use in Delphi because it's reserved. Another one I've noticed causing problems is UNIT...

regards,
Helen



All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________