Protected Sub btn_next_Click(sender As Object, e As EventArgs) Handles btn_next.Click Dim i As Integer = 0 For i = 0 To MaxRows i = i + 1 NavigateRecords(i) Next End Sub Where : MaxRows = tb.Rows.Count Private Sub NavigateRecords(int As Integer) Dim conn As New OleDb.OleDbConnection Dim strConn As String = "Provider=SQLOLEDB; Data Source=; Initial Catalog=; User ID=; Password=" conn.ConnectionString = strConn conn.Open() Dim dst As New DataSet Dim da As OleDb.OleDbDataAdapter Dim tb As DataTable = dst.Tables("Client") Sqll = "SELECT * FROM Person" da = New OleDb.OleDbDataAdapter(Sqll, conn) da.Fill(dst, "Customer") MaxRows = tb.Rows.Count txt_vl.Value = tb.Rows(int).Item("value")
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. Console.WriteLine(item) ' Invokes ToString abstract method. Next Next Console.Read
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)