Subject Re: [IBO] Column orderding
Author Robert martin
Hi Helen

You are 100% right Helen. After restructuring my OrderingItems syntax to Fieldname=Fieldname and fixing the bug in my code it works great. My app logic was actually sorting the field to the left, kind of confusing really :)

Rob Martin
Software Engineer

phone 03 377 0495
fax 03 377 0496
Wild Software Ltd
----- Original Message -----
From: Helen Borrie
Sent: Friday, September 17, 2004 11:18 AM
Subject: Re: [IBO] Column orderding

At 09:42 AM 17/09/2004 +1200, you wrote:
>Hi All
>I am trying to use the IBOQuery.OrderingItems and IBOQuery.OrderingItemNo
>properties to all on the fly grid ordering in our custom grids (these are
>VCL / dataset grids).
>I load OrderingItems with the appropriate order using this code ...
>sFieldName + '=' + sFieldName + '; ASC ' (which I found in help somewhere)
>and set the OrderingItemNo to the number of the item.
>This seems to wor great for some fields but not for others. The grid
>display always changes but only items on an indexed field are actually shown
>in order. Am I doing somoething wrong?

Are you sure that is what you are really seeing? You should be able to
create an OrderingItem out of any column that is a database column. You're
likely to get performance problems on non-indexed columns, but any column
or combination of columns that is both valid in an ORDER BY clause and
accessible by name can be an OrderingItem. You do have to work strictly
within the rules for valid ORDER BY clauses.

I don't know of any way to access the ORDER BY <degree-number> syntax for
expression columns via an OrderingItem, which would be the only way to
order a set by such a column. Maybe this is what you are looking at.

Joining could have a similar effect, where you omitted the underlying table
identifier when defining the OrderingItem. For these cases, your SQL must
have fully-identified table names, as must your ordering and search
criteria. Some output columns in self-referencing joins would not be
available as OrderingItems because of the mandatory aliasing required by
the SQL syntax.


IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Yahoo! Groups Sponsor

Yahoo! Groups Links

a.. To visit your group on the web, go to:

b.. To unsubscribe from this group, send an email to:

c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

[Non-text portions of this message have been removed]