[SOLVED] Jump to BOF, the first record in a table? lazarus / 16-Databases ---------------------------------------------------------------------- 1HuntnMan · 2024-02-15 22:12 Searching thru several docs for Laz/FPC and can't find an example for jumping to the first record or beginning of file.  Here's an example of BoF for a dBase table: DbfClients.BOF which is boolean but that context won't compile. I tried DbfClients.BOF:= True and I tried   DbfContacts.DataSource.DataSet.BOF, etc. Is there a way to jump to the first record or rather, refresh the DBGrid after changing the index. I reindexed the table and the DBGrid started behaving properly but still would like to force BoF or EoF. ---------------------------------------------------------------------- lainz · 2024-02-15 22:20 Hi, I usually use Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i .first(); Edit: As well Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i .last(); ---------------------------------------------------------------------- dsiders · 2024-02-16 02:10 Quote from: 1HuntnMan on February 15, 2024, 11:12:56 pmSearching thru several docs for Laz/FPC and can't find an example for jumping to the first record or beginning of file.  Here's an example of BoF for a dBase table: DbfClients.BOF which is boolean but that context won't compile. I tried DbfClients.BOF:= True and I tried   DbfContacts.DataSource.DataSet.BOF, etc. Is there a way to jump to the first record or rather, refresh the DBGrid after changing the index. I reindexed the table and the DBGrid started behaving properly but still would like to force BoF or EoF. TDataset.First https://lazarus-ccr.sourceforge.io/docs/fcl/db/tdataset.first.html TDataset.Last https://lazarus-ccr.sourceforge.io/docs/fcl/db/tdataset.last.html ---------------------------------------------------------------------- 1HuntnMan · 2024-02-16 18:48 Thanks all, got in my personal Laz doc. Seems like I used to use BoF and EoF in Delphi long time ago for Last and First but can't remember. ---------------------------------------------------------------------- Thaddy · 2024-02-16 19:18 Quote from: 1HuntnMan on February 16, 2024, 07:48:55 pmThanks all, got in my personal Laz doc. Seems like I used to use BoF and EoF in Delphi long time ago but can't remember. Both are still supported by FreePascal, but refer to type File of , way before TDataset and still work if you want to write a database  from scratch. ---------------------------------------------------------------------- dseligo · 2024-02-17 00:46 Quote from: 1HuntnMan on February 16, 2024, 07:48:55 pmThanks all, got in my personal Laz doc. Seems like I used to use BoF and EoF in Delphi long time ago for Last and First but can't remember. BOF and EOF exists, but they are read-only properties - you can test them to know if you are at the beginning or at the end of table (dataset).