title: How to prevent Delphi ADO from loading the entire table into memory?
body: <p>I am not a Delphi programmer, but I I got an old Delphi 7 application that I need to fix and it is using ADO.</p>
  
  <p>The database table (MS Accesss) contains +100,000 rows and when I set the ADOTable.Active=true it starts to load the entire table into RAM and that takes a lot of memory and time.</p>
  
  <p>How can I prevent ADO to load the entire table? I tried to set the MaxRecords but it does not help.</p>
  
  <p>Basically all we do is att program startup:</p>
  
  <pre><code>// Connect to database
  DataModule.MyADOConnection.Connected:=true;
  
  DataModule.MeasurementsADOTable.MaxRecords:=1;
  
  // Open datatables
  DataModule.MeasurementsADOTable.Active:=true;                  
  </code></pre>
  
  <p>After setting Active=true it starts to load the entire measurements into RAM and it takes TIME!</p>
  
  <p>We are using the MSDASQL.1 provider. Perhaps it does not support the MaxRecords property?</p>
  
  <p>How do I add some limiting query into this data object to only "load TOP 1 * from Measurements" ?</p>