title: Append Byte[] data into SQLite existing File
body: <p>Below was actual task:-
  <a href="https://stackoverflow.com/questions/47814140/i-want-to-take-backup-and-restore-of-sqlite-database-file-using-xamarin-azure-sd">Download SQLite file as byte[] and use in Xamarin.Forms mobile App</a></p>
  
  <p><a href="https://i.stack.imgur.com/95o3I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/95o3I.png" alt="enter image description here"></a></p>
  
  <p>Now ,</p>
  
  <p>I have 2 SQLite files with few common tables.
  File A which I have stored in APK / IPA which I am restoring on App Launch into Actual SQLite DB called File C,
  and for,
  File B which I am downloading after user Authentication,</p>
  
  <p>I am trying to Append File B Byte[] to File C,and it successfully appends the bytes but,</p>
  
  <p>However I check file size by browsing the file location after appending the file its size gets increased but,</p>
  
  <p>if I perform select statement on tables which are from file B I am not getting records from the table of it.</p>
  
  <p>I am using FileMode.Append for APPENDING File B byte[] into File C</p>
  
  <pre><code> using (BinaryWriter bw = new BinaryWriter(new FileStream(FilePath, FileMode.Append)))
                          {
                              byte[] buffer = new byte[2048];
                              int len = 0;
                              while ((len = br.Read(buffer, 0, buffer.Length)) &gt; 0)
                              {
                                  bw.Write(buffer, 0, len);
                              }
                          }
  </code></pre>