G
Guest
Hi,
I'm just coming from classic ADO (& still thinking that way) & I'm wondering
how you can determine when you get to the EOF in a data table. This is what
I've done below. It works, but I don't think it's the most elegant way of
doing it. How is this normally done? Am I thinking the totally wrong way for
ADO.NET?
Thanks for any thoughts.
Ant
int i = 0;
private void button1_Click(object sender, System.EventArgs e)
{
daEmployees.Fill(dsEmployees);
try
{
string empName = dsEmployees.Employees[i++].FirstName;
txtEmpName.Text = empName;
}
catch
{
// do nothing here
}
}
I'm just coming from classic ADO (& still thinking that way) & I'm wondering
how you can determine when you get to the EOF in a data table. This is what
I've done below. It works, but I don't think it's the most elegant way of
doing it. How is this normally done? Am I thinking the totally wrong way for
ADO.NET?
Thanks for any thoughts.
Ant
int i = 0;
private void button1_Click(object sender, System.EventArgs e)
{
daEmployees.Fill(dsEmployees);
try
{
string empName = dsEmployees.Employees[i++].FirstName;
txtEmpName.Text = empName;
}
catch
{
// do nothing here
}
}