public void makeDB() { SQLitePCL.SQLiteConnection dbConnect = new SQLiteConnection("Karty.db"); MySQLiteHelper mySQLiteHelper = new MySQLiteHelper(); ISQLiteStatement iSQLiteStatement = dbConnect.Prepare(mySQLiteHelper.getCreat_KP_TALE()); iSQLiteStatement.Step(); }
public void addNewKP(KartaPostaci KP) { SQLitePCL.SQLiteConnection dbConnect = new SQLiteConnection("Karty.db"); MySQLiteHelper mySQLiteHelper = new MySQLiteHelper(); ISQLiteStatement iSQLiteStatement = dbConnect.Prepare(mySQLiteHelper.getCreat_KP_TALE()); iSQLiteStatement.Step(); String insertString = "INSERT INTO " + TABLE_KARTY_POSTACI + " ("; for (int i = 1; i < columns.Length; i++) { insertString += columns[i] + (i + 1 != columns.Length?",":") VALUES ("); } List <object> lista = KP.zwrocListe(); for (int i = 1; i < lista.Count; i++) { insertString += "'" + String.Concat(lista[i]) + "'" + (i + 1 != lista.Count?",":");"); } //Show(insertString); dbConnect.Prepare(insertString).Step(); }