Subject Re: [IBO] TIB_Grid
Author Helen Borrie
At 12:01 AM 6/07/2007, you wrote:
>Hi List,
>I use a TIB_Grid in wich one of the columns is a TIB_LookupCombo.
>The contents of the combo are selected through the TIB_Query linked:
>select v.cod_id,
> v.cli_id,
> (select c.nome from clientes c where (c.cli_id = v.cli_id)
> as cli_descr, // combo
> from vendas v
> order by v.cod_id desc
> for update
>The column cli_descr is one of the OrderingItems of the query. It is
>shown correctly in the grid, but does not accept the click on the
>title to change order.
>The error message:
>"Project Bean.exe raised exception class EIB_ISCError with message
>'ISC ERROR CODE: 335544569
>Dynamic SQL error
>SQL error code = -206
>Column unknown
>At line 27, column 20.
>'. Process stopped. Use step or run to continue."
>Am I doing somethig wrong or it is not possible to order by columns
>like this ?

It's not possible to order by expressions by referring to the
artificial name of a derived field. In Fb 1.5.x, ordering by an
expression can be achieved via the the 'order by <column_number>
syntax or by duplicating the expression in the Order By clause. I
don't think IBO has ever been able to support those via the
parser-generated statement that is involved with OrderingItems.

Now that Fb 2.0 supports expression indexes, I guess there is some
kind of outside chance Jason might find a way to hook up such an
index with OrderingItems....