[SOLVED] DBGrid, a firebird big table and ZEOS lazarus / 16-Databases ---------------------------------------------------------------------- Mando · 2012-06-27 18:57 Hello: I've a Firebird big table (+100,000 records) and this is my problem: I do a query like this SELECT * FROM PEDIDOLIN using a TZQUERY. I've a DBGRID, where I want to see the data. Well, if the  DBGRid is not linked to the ZQUEY, this opens to the speed of light, but if the DBGRID is linked to the ZQUERY, takes several seconds to display data. I supose this is because the grid loads all records. There are any way to change this behavior and do like flameRobin. regards ---------------------------------------------------------------------- Mando · 2012-06-28 13:41 Hello: I also tested SQLdb. in Both  cases I obtained the same result when query control isn't connected to a grid. But with SQLdb, the grid doesn't load all the records. It is possible this with zeos? regards. ---------------------------------------------------------------------- BigChimp · 2012-06-28 14:01 Mando, I don't know as I don't know Zeos. If you don't get an answer here (and have searchted the wiki and this forum), perhaps it's a good idea to ask on the Zeos forum as your issue is presumably more linked to Zeos than to Lazarus... I think the Zeos article on the wiki has the forum address. Good luck, BigChimp ---------------------------------------------------------------------- ludob · 2012-06-28 14:34 TZQuery.FetchRow:=10; will do something similar as sqldb. It'll fetch 10 rows and then rows when needed. Watch out for some pitfalls when using this: -TZQuery.RecordCount will return the number of rows fetched, not the number of rows in the table. -For some database backends you can't commit a transaction when not all rows are returned. -Some database backends don't allow multiple simultaneous active queries and the select will remain active until all records read. ---------------------------------------------------------------------- Mando · 2012-06-28 16:41 Thanks for your responses. ludob: That's the solution, I feel very stupid. Regards.