Bernard,
In ADO.NET, you have a datatable, which is pretty much the same as the
recordset. The DataTable exposes the Rows property, which uses a zero-based
index. Given that, you can do this:
for (int index = 0; index < dt.Rows.Count; ++index)
{
// Get the row.
DataRow row = dt.Rows[index];
// Work with the row here.
}
The Rows property returns a DataRowCollection, which implements the
IEnumerable interface, so you can also do this:
foreach (DataRow row in dt.Rows)
{
// Work with the data row.
}
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Bernard Kim" <Be********@discussions.microsoft.comwrote in message
news:5F**********************************@microsof t.com...
>I have VC# 2005. I need to use ADODB instead with ADO.NET. I can open a
recordset. however, I can not navigate records in recordset. How can I
navigate records? What is the command line for adorecordset.movenext,
adorecordset,movefirst...etc. Please help me out.