Dbgrid limit lazarus / 16-Databases ---------------------------------------------------------------------- flori · 2021-02-24 13:17 Hi everyone! I have a small demo program. Does anyone know how to limit the number of rows in dbgrid?  I don’t want the user to have unlimited use of ... Thank you ---------------------------------------------------------------------- balazsszekely · 2021-02-24 13:39 Quote from: flori on February 24, 2021, 02:17:35 pmHi everyone! I have a small demo program. Does anyone know how to limit the number of rows in dbgrid?  I don’t want the user to have unlimited use of ... Thank you Method 1: Change sql text from: Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i select * from soilto Code: MySQL  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i select FIRST 100 * from soil Method2: Set SQLQuery Filtered property to true, then create an OnFilterRecord: 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 procedure TForm1.SQLQuery1FilterRecord(DataSet: TDataSet; var Accept: Boolean);begin  Accept := DataSet.FieldByName('ID').AsInteger < 100;end; ---------------------------------------------------------------------- flori · 2021-02-24 14:08 thank you