[fpc-pascal] sqldb how to find a record fast with primary key

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Wed Oct 19 16:53:00 CEST 2011


I am using sqldb to connect to a postgres database. Using wiki
instructions, my final object is a TSQLQuery for each table. So, this
basically is a TDataset and to read fields I know that I can use
First(), Next(), EOF() and RecNo

But these are rather slow. Many fields in the tables refer to the
primary key in other tables, which does not match the RecNo. How can I
jump fast a table to the record which has a particular PrimaryKey?

Felipe Monteiro de Carvalho

More information about the fpc-pascal mailing list