On Fri, 06 May 2016 13:44:46 -0500, Aradeonas <aradeo...@operamail.com> wrote:

Jesus,In that demo if I set BufferCount to 9 always get 9 records and even Query.RecordCount will be 9 even result is more. How can I get real count? I can get count before setting the link but is it the best way?

DbGrid does not do that, and it doesn't have to. And the best way would depend, I guess, on the specific situation and what set of components are being used.


How can I move or scroll link without moving Query? I want to scroll the grid and get new data without changing RecNo. In your example if I only got 9 record for example but I want for example 20th record.


Not sure if I understand the part on "moving the query", but using TDataset derived components, and without using the basic MoveBy, Locate, first, last, next or prev you can't. Some dataset descendants may have some properties that help at some cost, for example y you set PacketRecords:=-1 then sqldb will load all the records and in this case RecordCount may be reliable, that is if dataset is not filtered (or that seems to indicate the relevant documentation). Some datasets may actually return a valid record count, probably TDbf is in this case. In any case without using the mentioned basic operations you can't select records.

Regards,
Ara


Jesus Reyes A.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to