Tmyquery - SetOrderBy

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

Tmyquery - SetOrderBy

Post by kenny » Wed 11 May 2005 03:42

Hi,

The SetOrderBy in TMyQuery will overwrite the statement after ORDER BY Clause? eg:
SELECT name FROM cust ORDER BY name &MyLIMIT
&MyLimit is the macro for the query...

Thanks

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 11 May 2005 14:25

You are right, SetOrderBy method doesn't process macroses. To solve the problem you should extract LIMIT keyword from macros to SQL.
SELECT name FROM cust ORDER BY name LIMIT &MyLIMITValue

Post Reply