1

Below was actual task:- Download SQLite file as byte[] and use in Xamarin.Forms mobile App

enter image description here

Now ,

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,

I am trying to Append File B Byte[] to File C,and it successfully appends the bytes but,

However I check file size by browsing the file location after appending the file its size gets increased but,

if I perform select statement on tables which are from file B I am not getting records from the table of it.

I am using FileMode.Append for APPENDING File B byte[] into File C

 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)) > 0)
                            {
                                bw.Write(buffer, 0, len);
                            }
                        }
Sanket
  • 452
  • 3
  • 18

0 Answers0