Page 1 of 1
Generic Limit and Offset (Pagination)
Posted: Wed 07 Apr 2010 12:30
by FarshadV
Is there a generic Limit & Offset command which uniDAC will translate to the proper format for the target database system?
Best Regards,
Farshad R. Vossoughi
Posted: Thu 08 Apr 2010 14:52
by bork
UniDAC is universal. Limit & Offset commands are supported only by several databases. That's why we did not implement support for Limit & Offset commands in UniDAC.
But you can use macros to use Limit & Offset commands:
UniQuery.SQL:= 'SELECT * FROM Dept &LimitAndOffset';
And define them depending on the current database:
if UniConnection.ProviderName = 'MySql' then
UniQuery.MacroByName('LimitAndOffset').Value:= 'LIMIT 10 OFFSET 10'
else if UniConnection.ProviderName = '...' then
...
else
UniQuery.MacroByName('LimitAndOffset').Value:= '';
Posted: Fri 09 Apr 2010 13:28
by FarshadV
Thank you very much
Best Regards,
Farshad R.Vossoughi