no more than 10 RecordCount ? [Postgres] lazarus / 16-Databases ---------------------------------------------------------------------- onionsjk · 2007-12-06 21:38 Hi there, My working environment is "ubuntu feisty + fpc 2.* + lazarus 0.9.24 + postgres 8.2". I have installed all of them through "synaptic", so they are up to date. My method is "PQConnection + SQLTransation + SQLQuery" and it has worked fine. "select, insert, delete". My program is "I-have-20-records-but-only-10-records-are-shown" with    SQLQuery.SQL.text:='select * from mytable'    SQLQuery.Open    SQLQuery.RecordCount ---> 10 When I check the table by console program "psql" , I can see 20 records. I need to know what makes this happen. Thank you. ---------------------------------------------------------------------- alexs · 2007-12-07 06:16 SQLQuery.FetchAll ? ---------------------------------------------------------------------- onionsjk · 2007-12-07 13:57 I don't find "FetchAll" method. ---------------------------------------------------------------------- ematutu · 2009-01-19 17:54 Before SQLQuery.Open , set property PacketRecords to desired number. SQLQuery.PacketRecords := 100; ---------------------------------------------------------------------- Loesje · 2009-01-20 13:03 You can also do SQLQuery.Last; before you ask for the recordcount. The recordcount property only gives the amount of fetched (cached) records. If you go to the last records, all records are fetched. You can also set recordcount to -1, then all records will be fetched when opening the dataset. ---------------------------------------------------------------------- mojontp · 2009-01-20 22:09 does somebody know, where can i put some features on a wishlist? e.g. FetchAll? In the old version of sqldb it was append. now they changed it and it took a while for me to discover the ".last;" workaround... greetings ---------------------------------------------------------------------- Loesje · 2009-01-22 15:39 You could use the freepascal bug-tracker. But it doesn't seems a usefull feature to me. Last is no work-around, it's the same as a FetchAll would do. Besides that it changes the current record... If you want to fetch all records, use PacketRecords := -1. Why would you want to fetch all records, all of a sudden?