1 2 3 4 5 6 7 8 9 10 11 12
| SQLiteConnection.CreateFile(textBox2.Text + "\\" + textBox1.Text + ".db");
string var = "Data Source=" + textBox1.Text + ".db;Version=3; New=False";
connectiondb = new SQLiteConnection(var);
connectiondb.Open();
connectiondb.ChangePassword("mypassword123");
variableglobal.DOSSIER = "Data Source=" + textBox1.Text + ".db;Version=3; New=False; Password=mypassword123;";
connectiondb = new SQLiteConnection(variableglobal.DOSSIER);
connectiondb.Open();
sql = "CREATE TABLE IF NOT EXISTS nouveaudossier(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, nom VARCHAR(255), prenomVARCHAR(255), chemin VARCHAR(255), annee VARCHAR(255), , datecreation default current_timestamp)";
command = new SQLiteCommand(sql, connectiondb);
command.ExecuteNonQuery(); |
Partager