The above-mentioned exception is thrown by visual studio when I run the result of this code's compilation :
requete = @"select v.[*] from Visite v, Infirmière i where v.[code_inf] = i.[code_inf]" /* +
" and i.[nom_inf]='" + nom + "'" +
" and i.[prenom_inf]='"+prenom+"'"+
" and v.[date_visite]=to_date('" + d.ToString().Substring(0, 10)+"','DD/MM/YYYY')" */
;
MessageBox.Show(requete);
OleDbCommand dbc = new OleDbCommand(requete, connec);
OleDbDataReader dr = dbc.ExecuteReader();
while(dr.Read())
{
dgv_res.Rows.Add(dr.Read());
}
dgv_res
is a datagridview component, and connec
is an open connection.
I commented a part of my request to see if there was a SQL mistake in it but I really don't see what's wrong in the first line and I keep on getting this exception. I've checked the columns and tables names many times.
This
no value given for one or more of the required parameters
is thrown where I create the OleDbDataReader
I think.
Thanks for reading !