Page 1 of 1

SQL Order By Problem

Posted: Sun 23 May 2010 21:22
by DJK
I am using Delphi 2010 with the Mydac components to connect to my online mysql database. The problem Im having is the following..

I am connecting my table to the mydatasource1 which in turn is connected to the mytable1.

The mytable1 when I double click I have under the 'order by' part the text 'points desc'. This results in the sql string

"select * from mytable order by points desc"

Problem is while it fetches my data just fine, it doesn't order by the points field as it should :( Any ideas why this is happening ?

Thanks.

Posted: Sun 23 May 2010 21:26
by DJK
Addendum. I just tried using a "myquery1" instead of a "mytable1" and this DOES order the table correctly. So while I can fix it this way I still think it's weird mytable behaves ackward....

Posted: Tue 25 May 2010 12:03
by Dimon
I can not reproduce the problem. Please make sure that the MyTable.IndexFieldNames property is empty.