0
votes

I am working on windows phone 8 and My process was:

  1. I cloned git repo into my local.
  2. I added that c++ project (Sqlite) into my existing project.
  3. Than i added Sqlite-net ( SQLite.cs and SQLiteAsync.cs) into my project.
  4. Than created USE_WP8_NATIVE_SQLITE compilation symbol successfully.

DB created and records are insert into table also but problem is whenever i start emulator the same name DB is and table is create again...even i had put condition for checking DB File Exists or not.if run apps without closing emulator it working and DB not created twise. so if any one know what is problem please tell me...

1
Please share some of your code - Vivek Jain
In App.xaml file add this code string dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "db.sqlite"); if (!FileExists("db.sqlite").Result) { using (var db = new SQLiteConnection(dbPath)) { db.CreateTable<Person>(); } } - pooja
and follow the instruction as per this link codeproject.com/Articles/578154/… - pooja

1 Answers

0
votes

Should you not be doing this?

if (!FileExists(dbPath).Result) ...