non non...
ca marche mieux comme cela :
string connect = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
OracleConnection con = new OracleConnection(connect);
//requete
con.Open();
OracleCommand command = new OracleCommand("select idclient from client where nom = ?" , con);
command.Parameters.Add(new OracleParameter("nom", OracleType.VarChar,100));
command.Parameters["nom"].Value = var1.ToString();
OracleDataReader reader = command.ExecuteReader();
reader.Read();
TextBox1.Text = reader[0].ToString();
reader.Close();
con.Close();
Attention : pour oracle les paramètres doivent être créés dans l'ordre de la requête/procédure.
Sébastien FERRAND (blog)
Consultant Indépendant
[Microsoft Visual C# MVP]