I found a nice feature with TUniQuery. Whenever i reopen an existing query after setting the same statement again, i get the same amount of records delivered but the amount of data which is transfered from database is always double of the amout before.
There is no data source connected. Just the Connection and the Query. I use FetchAll = False.
To reproduce that you need a table with a huge amount of records on another PC so that you can see (and feel) when the data is transfered.
Provider is SQL Server.
UniQuery.SpecificOptions.Values['FetchAll'] := 'False';
On a button Click event have i only this lines:
Code: Select all
if UniQuery.Connection = nil then begin UniConnection.Connect; UniQuery.Connection := UniConnection; UniQuery.SpecificOptions.Values['FetchAll'] := 'False'; end; UniQuery.SQL.Text := 'SELECT * FROM MyTable'; UniQuery.Open;
With a tool for checking network traffic will you see that the amount of transfered data will increase every time you press the button.
It have the same effect if i set the statement once and close and open the query in the button click.
So, now the question, is this a feature or a bug?
I am sure it is a bug. Because, at least half of the transfer happens when the statement is set or when Close is called before change of statement.