Subject RE: [IBO] TIB_Quert property Ordering Items
Author Mike Hickman
Thanks Geoff.

The alternatives available to achieve my requirements are simple enough, I
was just intrigued by the simplicity of Jasons example in the Getting
Started Guide. Thanks for comments regarding the Tib_LookUpDialog.

I (like all new users with a Paradox/BDE background ? ) am overwhelmed by
the number of properties in the component set. I often cannot see the woods
for the trees. The good news is that I am getting there and once learned the
seeming unsurmountable problems become in hindsight little hurdles.

Thanks to all that participate in this very active Newsgroup.

I have found that reading others problems and the suggested answers a great
learning tool.

Is it intended that a comprehensive manual or book be published ? If one is
planned I will forward order . Even pay in advance !

Mike Hickman

-----Original Message-----
From: Geoff Worboys [mailto:geoff@...]
Sent: Saturday, 3 March 2001 6:37 PM
Subject: Re: [IBO] TIB_Quert property Ordering Items

> Lookbook has an unsorted result if the order is set at run
> time with the onbeforeprepare event handler, but is sorted
> if the Order By is hard coded in the sql property of
> sqllookbook. Why isnt the onbeforeprepare handler being
> called(or actioned )?

It seems I may have been a bit mistaken in my previous posting. I
have never used SQLOrder before, I've always managed to get by with
the Ordering* properties.

So, ignore what I said about using OnPrepareSQL. Sorry about that. I
was thinking it worked like the SQLWhereItems - which only operate
within the OnPrepareSQL.

SQLWhereItems can be used inside OnPrepareSQL to add subclauses to the
where statement dynamically during a prepare. Such additions are NOT
made to the primary SQL statement.

SQLOrder (and related properties) can be used to change the particular
clause of the SQL statement itself! These properties change the
entire clause of the SQL property and so must be handled with care and
fully defined.

According to my experimentation, to change the order clause you would
need to *replace* the property not add to it. So your code should

Having said that. This is entirely inappropriate for use with
TIB_LookupDialog (or anywhere you are using a grid with sort
indicators), since the grid sort indicators use the Ordering*
properties to determine the current and possible sort orders.

Sorry about the initial misunderstanding. I may have been using IBO
for years but there are still chunks of it I have never had to use :-)

Geoff Worboys
Telesis Computing

Your use of Yahoo! Groups is subject to