Page 1 of 1

Limit the size of the data returned by the query

Posted: Sat 15 Dec 2018 01:21
by flyfire
Hi,
Excuse me, there is method or attribute for the unidac component, which can limit the size of UniQuery receiving data, such as 20MB.
Sometimes executed SQL statement, the returned data is too large.

Re: Limit the size of the data returned by the query

Posted: Tue 18 Dec 2018 11:33
by azyk
You can fetch a dataset by pieces. For this, set TUniQuery.FetchAll to False. You can set a limit of fetched data in the TUniQuery.FetchRows property.

FetchAll: https://www.devart.com/unidac/docs/deva ... tchall.htm
FetchRows: https://www.devart.com/unidac/docs/deva ... chrows.htm

Re: Limit the size of the data returned by the query

Posted: Wed 19 Dec 2018 06:43
by flyfire
This is also a method, but sometimes it is not convenient.
For example, when a user queries data for several months, I want to limit the size of the data.
When the size exceeds the set value, an exception is reported.

Use this method before there is no better way.

Thank you

Re: Limit the size of the data returned by the query

Posted: Wed 19 Dec 2018 12:30
by azyk
Please specify the DBMS you are using.

Re: Limit the size of the data returned by the query

Posted: Wed 19 Dec 2018 13:36
by flyfire
MS SQL Server 2005

Re: Limit the size of the data returned by the query

Posted: Thu 20 Dec 2018 11:26
by azyk
TSQLServerUniProvider does not have a separate feature to limit data size fetching. Try searching for a ready-made solution at specialized forums.

Re: Limit the size of the data returned by the query

Posted: Fri 21 Dec 2018 00:24
by flyfire
Thank you .