Searching with SQL lazarus / 16-Databases ---------------------------------------------------------------------- DexterCat · 2016-01-28 18:09 I am a total newbie when it comes to using SQL but I am making headway. I have a small application that displays a table from an database using DBGrid.  On the same form I have a series of components in a group to display the contents of one record in a card type.  I scroll in the grid and the the contents of the card update.  Very cool. Now I put in a few more components that allow me to enter in a simple search on a unique field.  It works well.  But the effect is not what I want.  The grid now displays the results of the search.  I would prefer that the grid display the entire table as before but have the table advanced to the found record. Is this possible or will it involve some magic and trickery that I don't know yet? ---------------------------------------------------------------------- hrayon · 2016-01-28 18:50 Hi Are you using some TDataset? Look this: http://www.freepascal.org/docs-html/3.0.0/fcl/db/tdataset.locate.html ---------------------------------------------------------------------- DexterCat · 2016-01-28 21:01 Quote from: hrayon on January 28, 2016, 07:50:23 pmHi Are you using some TDataset? Look this: http://www.freepascal.org/docs-html/3.0.0/fcl/db/tdataset.locate.html Do I do not think so.   I used Firebird to create the database.  It has several tables and I have been SQL to display it in a DBGrid. ---------------------------------------------------------------------- DexterCat · 2016-01-29 00:39 Actually, I think what I want does not really fit in with the relational database world rathe in the transactional world.  It can be done with a lot of looping and searching not using SQL which pretty much defeats the purpose of using SQL.  I will rethink this.  Thanks!