Scrolling through DataTables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am looking at C# and Ado.Net database development, however I come from a
Delphi background, but I’m getting there.

Once I have retrieved my data from Sql Server I have a DataTable with all
the DataRows in it, I can use find to locate a specific record (using the
index), is it possible to scroll backwards and forwards through the
DataTable. In Delphi we hade Next, Last etc

Thanks

Tim
 
Hi Tim,

You normally work on the Rows collection. Either using foreach or you can
index into the collection if you really need to go backwards and forwards.

If you have VS2005 have a look at
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.NETDEVFX.v20.en/cpref4/html/T_System_Data_DataRowCollection.htm
in the online help, or search for DataTable and look at the Rows property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top