Increase Table Updates by 350%

2 simple lines of code will greatly improve table update speed

If you are doing batch updates like Append, Insert, Delete to a table,

Most of you are already using "Table1.DisableControls;" to disable

the controls connected to the Table.



But this isn't enough. If you want to speed things up even more, you

should also set DataSource1.DataSet := nil; as well. I found this

speeded up table updates by 350% when appending records to Advantage tables.

This should work on any type of table, even 3rd party databases.



It looks something like this:



  with Table1 do

    try

      DisableControls;

      DataSource1.Dataset := nil;



      {Do your processing on Table1 here}



    finally

      DataSource1.Dataset := Table1;



      EnableControls;

    end;






 

Share this article!

Follow us!

Find more helpful articles: