myReader3.Read(); double tarifs=(double)myReader3[0]; MessageBox.Show(tarifs+"");
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionstring requete3 = "SELECT "+num+" FROM Europe WHERE Pays=@Pays AND Departement=@Departement;"; OleDbCommand command3 = new OleDbCommand(requete3, Calculette); command3.Parameters.Add(new OleDbParameter("@Pays", pays)); command3.Parameters.Add(new OleDbParameter("@Departement", dep)); OleDbDataReader myReader3; myReader3 = command3.ExecuteReader(); myReader3.Read(); double tarifs=(double)myReader3["Colonne" + num.ToString().Replace(",", "_").Replace(".", "_")]; MessageBox.Show(tarifs+""); Calculette.Close();