TIBQuery and Sort

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

TIBQuery and Sort

Post by alexhaifa » Thu 29 May 2014 14:53

Hello,

I'd like to know if it is possible after opening a query sort it by field without close and
open it again. Like Adoquery allows with Adoquery.sort := 'field asc';

thanks
Alexandre

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: TIBQuery and Sort

Post by PavloP » Fri 30 May 2014 10:02

Yes, there is such a capability in IBDAC. Set the needed value for the IndexFieldNames property of the TIBCQuery component, for example:

Code: Select all

IBCQuery1.IndexFieldNames := 'field1';
This will lead to records sorting in the dataset without closing it.
See more details in our documentation:
http://www.devart.com/ibdac/docs/index. ... dnames.htm

alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

Re: TIBQuery and Sort

Post by alexhaifa » Sat 31 May 2014 01:05

Hello PavloP,

Thanks for your reply. But I am having some problem with this.
My language is portuguese and I have some accented words, when I make a query

I order the query this way:

ORDER BY FIELD ASC COLLATE PT_PT

The collate avoid obey accented word and give a correct order, when I tried your tip,
it worked without any collate possibility. I really need the collate PT_PT to avoid ordering the query abeying accented words. Is there any way to do this?

Thanks
Alexandre

alexhaifa
Posts: 18
Joined: Thu 29 May 2014 12:48

Re: TIBQuery and Sort

Post by alexhaifa » Mon 02 Jun 2014 19:48

Hello,

Don't worry

I have found the solution :))

DataSet1.IndexFieldNames := 'LastName ASC CIS; DateDue DESC';

http://www.devart.com/ibdac/docs/index. ... tions).htm

PavloP
Devart Team
Posts: 149
Joined: Fri 24 Jan 2014 12:33

Re: TIBQuery and Sort

Post by PavloP » Tue 03 Jun 2014 09:36

It is good to see that the problem has been solved.
If any other questions come up, please contact us.

Post Reply