la base de donnée :
Code C#
string connString = "DRIVER=HFSQL;Server Name=127.0.0.1;Server Port=4998;Database = 2017; UID = admin; PWD =";
OdbcConnection Connexion =
new OdbcConnection(connString);
Connexion.Open();
string Requete = "SELECT * FROM ville";
OdbcCommand Command = new OdbcCommand(Requete, Connexion);
OdbcDataReader DATA = Command.ExecuteReader();
while (DATA.Read())
{
dataGridView1.Rows.Add(DATA.GetInt32(0), DATA.GetString(1));
}
Résultat
0 commentaires:
Enregistrer un commentaire