private static void createTables() { try { SQLCalls.ExecuteQuery(SQLQueries.Queries["createTables"]); } catch (Exception exc) { Debug.WriteLine(exc.Message); } }
private static bool doTablesExist() { MySqlDataReader rdr = SQLCalls.ExecuteQuery(SQLQueries.Queries["showTables"]); while (rdr.Read()) { if (rdr[0].ToString() == "customers" || rdr[0].ToString() == "products" || rdr[0].ToString() == "orders") { SQLCalls.CloseConnectionAndReader(); return(true); } } SQLCalls.CloseConnectionAndReader(); return(false); }