title: TClientDataSet : Mismatch in datapacket
body: <p>I'm on Delphi 10.3. I use TClientdataset a lot in my applications, as a way to locally store small amount of information, usually less than 10000 rows.</p>
  <p>Basically i create the table structure and save it on disk :</p>
  <pre><code>myClientDataSet.savetofile('c:\mydata.dat') ;
  </code></pre>
  <p>This is a great way to have a persistence mechanism without having to install any database. It works but i noticed that at some point i can't open the file anymore, because when i try to load :</p>
  <pre><code>myClientDataSet.loadfromfile('c:\mydata.dat');
  </code></pre>
  <p>I'll get this error :</p>
  <pre><code>Mismatch in datapacket.
  </code></pre>
  <p>When this happens, as far as i know the only fix is to delete the file and create a new one, loosing all data (or restoring a backup, if it exists). In some cases this issue will take years to happen, but always happen at some point.</p>
  <p>What can i do to avoid this issue and if it already happened, is there a way to recover the data file with this error ?</p>
  <p>Thanks</p>