indexfieldnames and order by

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

indexfieldnames and order by

Post by inageib » Mon 18 Apr 2011 13:47

Hello,
I set the property indexfieldnames to the ID of a table and I set the select SQL to have order by name field but the order by has no effect

I figured out that I must change indexfieldnames to sort based on the name, but I really wish to change that behavior and always make the SQL override any property in the component

thanks

AndreyZ

Post by AndreyZ » Tue 19 Apr 2011 09:30

Hello,

The ORDER BY statement in your SQL code means that data will be sorted on the server. The IndexFieldNames property is used to sort data locally. If you want to sort data only on the server, you shouldn't set the IndexFieldNames property.

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Tue 19 Apr 2011 09:52

ok if I did not set IndexFieldNames will not affect on the component work for any thing ?

AndreyZ

Post by AndreyZ » Tue 19 Apr 2011 11:46

If you don't set the IndexFieldNames property, IBDAC won't sort data received from the server (IBDAC retains server order).

inageib
Posts: 184
Joined: Wed 26 Aug 2009 14:11

Post by inageib » Tue 19 Apr 2011 11:53

Thanks alot

Post Reply