Exemplo n.º 1
0
 private void InitializeTables(SQLiteDatabase db)
 {
     db.ExecuteNonQuery("BEGIN EXCLUSIVE");
     for (int i = 0; i < CREATE_Commands.Length; i++)
     {
         db.ExecuteNonQuery(CREATE_Commands[i]);
     }
 }
Exemplo n.º 2
0
        private SQLiteDatabase OpenDB(string fileName)
        {
            if (File.Exists(fileName))
                File.Delete(fileName);

            var db = new SQLiteDatabase(fileName);

            for (int i = 0; i < PRAGMA_Commands.Length; i++)
            {
                db.ExecuteNonQuery(PRAGMA_Commands[i]);
            }

            return db;
        }