Subject Re: [IBO] TIB_Query ORDERING
Author Helen Borrie
At 05:45 AM 13-11-01 +0200, you wrote:
>Hi,
>
>I have set the Ordering on a specific field in a dataset(as described in the getting started manual). The only way to get the ordering to be effective when adding and then deleting records from this dataset, is to Close and then Open the dataset(TIB_Query). A refresh has no effect. I will need to do this +- 50 000 times in the app - seems a waste of time.

Can you explain a bit more what kind of mechanism you want to achieve, that requires buffer re-ordering 50 000 times in one app? OrderingItems and OrderingLinks are to give the user easy navigation tools for interactive work - searching. It seems unlikely that 50 000 inserts and deletes are going to be done interactively...

If in fact you want a dataset that is ordered by a single column and you aren't interested in changing the COLUMN on which the rows are ordered, then OrderingItems is the wrong place. You should do it with an ORDER BY clause in the SQL statement. Then, provided the deletes and adds are in a READ COMMITTED transactions and your dataset's synch flags are set appropriately, the dataset will take care of displaying things in the right order.

Tell us more about what you need to do...

Helen


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