Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Private Sub ButtonX9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX9.Click
        
        Dim ds As New DataSet
        Dim dt As New DataTable
        Dim da As New SqlDataAdapter("Select * from users", con)
        da.Fill(dt)

        TextBox1.Text = dt.Rows(0 + 1).Item(2)
        TextBox2.Text = dt.Rows(0 + 1).Item(3)
        TextBox3.Text = dt.Rows(0 + 1).Item(4)
        TextBox4.Text = dt.Rows(0 + 1).Item(5)
        TextBox5.Text = dt.Rows(0 + 1).Item(0)
        TextBox6.Text = dt.Rows(0 + 1).Item(1)
        TextBox7.Text = dt.Rows(0 + 1).Item(1)
End Sub

By this I can move to only one record. What should I do to move to all the records one by one?
Posted
Updated 31-Jan-13 23:01pm
v2

1 solution

Google for "BindingNavigator" for an automated solution or "BindingSource" for more control but also more work on your part.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900