hi,
I'm using access db in my c# program I have a select query and I want to present
the result in data grid view ,I succeed doing that with this while loop
Code: ( c )
int i = 0,j=0;
while (dbReader.Read())
{
dataGridView2.Rows.Add();
dataGridView2[j, dataGridView2.Rows.Count - 1].Value = (string) [ dbReader.GetValue(0).ToString(); j++;
dataGridView2[j, dataGridView2.Rows.Count - 1].Value = (string)dbReader.GetValue(1); j++;
dataGridView2[j, dataGridView2.Rows.Count - 1].Value = (string)dbReader.GetValue(2);
i++;
j = 0;
}
is there an appropriate way doing it that sent the all result to the table at once?
thanks,