Page 1 of 1
IndexFieldNames get Error
Posted: Fri 01 Dec 2006 02:32
by mysqluser
hello
if i set
MyQuery->IndexFieldNames = "Age ASC";
i get sometimes the error: "Field Age not found". Any idea why?
Posted: Fri 01 Dec 2006 13:37
by Antaeus
MyDAC performs local sorting by the field which is specified by the IndexFieldNames property. If the field named Age exists in the server table, but it is not requested to the client, MyDAC is unable to find this field to perform sorting. So, error with such message is raised. There are to ways to solve this problem:
- to add the Age field name to the field list reqested from the server;
- to forse sorting on the server by adding ORDER BY clause to the SELECT statement.
Posted: Fri 01 Dec 2006 21:11
by mysqluser
thanks Antaeus