Click here to Skip to main content
15,886,795 members
Articles / Programming Languages / Visual Basic

How to loop through records in a datatable?

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
23 Nov 2012CPOL 9.2K  
I want to loop through the records of the datatable and retrieve data from the each column of the datatableand fill the textboxes.what should i do to moveNext button?I have tried :Protected Sub btn_next_Click(sender As Object, e As EventArgs) Handles btn_next.Click Dim i As...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
23 Nov 2012Krunal Rohit
loop through all records:Dim table As DataTable = GetTable' Get the data table.For Each row As DataRow In table.Rows Console.WriteLine("--- Row ---") ' Print separator. For Each item As var In row.ItemArray Console.Write("Item: ") ' Print label. ...
Please Sign up or sign in to vote.
23 Nov 2012__TR__
Check the below linksLooping through all rows of the DataTable[^]http://www.dotnetperls.com/datarow-vbnet[^]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions