1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
SqlCommand command = new SqlCommand("", connection);
MySqlCommand command2 = new MySqlCommand("", conn);
label62.Text = sourcename;
//Test pour savoir si la base existe
try
{
if (SGBD == "Mysql")
{
conn.ChangeDatabase("Simulateur");
}
else
{
connection.ChangeDatabase("Simulateur");
}
}
{
///****************************************************************//
// Création de la table automate//
// requete type pour créer une base //
if (SGBD == "Mysql")
{
command2.CommandText = "CREATE DATABASE Simulateur";
command2.ExecuteNonQuery();
}
else
{
command.CommandText = "CREATE DATABASE Simulateur";
command.ExecuteNonQuery();
} |