Page 1 of 1

Tmyquery - SetOrderBy

Posted: Wed 11 May 2005 03:42
by kenny
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

Posted: Wed 11 May 2005 14:25
by Ikar
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