Example #1
0
 // Checks if the datastore contains the appropriate tables - adds them if necessary
 private void ValidateSchema()
 {
     foreach (Type table in dataStoreTables)
     {
         dbSQLite.CreateTable(table);
     }
 }
Example #2
0
 void ValidateSchema()
 // Checks if the datastore contains the appropriate tables - adds them if necessary
 {
     foreach (Type table in dataStoreTables)
     {
         dbSQLite.CreateTable(table);
     }
 }
Example #3
0
        private void ValidateSchema()
        // Checks if the datastore contains the appropriate tables - adds them if necessary
        {
            foreach (Type table in dataStoreTables)
            {
                dbSQLite.CreateTable(table);

                //string query = string.Format("SELECT COUNT(*) FROM sqlite_master WHERE type='table' AND name='{0}';", table.Name);
                ////SQLiteCommand command = dbSQLite.CreateCommand(query);

                //int RowCount = 0;
                //string result = dbSQLite.ExecuteScalar<string>(query);
                //RowCount = Convert.ToInt32(result);
                //if (RowCount == 0)
                //{
                //    dbSQLite.CreateTable(table);
                //}
            }
        }