3
Answers

How to verify that a row and already inserted andnever shows

ma ouml

ma ouml

7y
212
1

Hello friends I have problem is when I click button search it shows me the program also the rows inserted into a short table I want the rows inserted will not be visible as they are assigned to a record I know Not that I have correctly described my problem, my question I translated it in English to not find a comment that tells me that you know not speak in English I hope that someone helps me to solve this problem the Button search code I will extract here and thank you in advance
 
 
 
dataGridView2.Rows.Clear();
Program.cmd.CommandText = "select * from bon_reception_marche where Date_reception between '" + dateTimePicker1.Value.Date + "' and '" + dateTimePicker2.Value.Date + "' and Id_marche in (select TOP 1 Id_marche from marche where Num_marche = '" + textBox1.Text + "')";
Program.dr = Program.cmd.ExecuteReader();
while (Program.dr.Read())
{
dataGridView2.Rows.Add(Program.dr[0], Program.dr[2], Program.dr[3], Program.dr[5], Program.dr[6], Program.dr[7], Program.dr[8], Program.dr[9], Program.dr[10], Program.dr[11], Program.dr[12]);
}
Program.dr.Close();

Answers (3)