move to next record each time in

October 28, 2010 at 01:16:15
Specs: Windows XP
Dim i As Integer
Dim con As New SqlConnection("Data Source=QADCOM7026;Initial Catalog=stu_info1;Integrated Security=True")
Dim adp As New SqlDataAdapter("select * from stu_info", con)
Dim builder As New SqlCommandBuilder(adp)
Dim ds As New DataSet()
adp.Fill(ds, "stu_info")

If (i < ds.Tables(0).Rows.Count - 1) Then
i = i + 1

textBox1.Text = ds.Tables(0).Rows(i)("First_name").ToString()
textBox2.Text = ds.Tables(0).Rows(i)("Last_name").ToString()
textBox3.Text = ds.Tables(0).Rows(i)("Address").ToString()
textBox4.Text = ds.Tables(0).Rows(i)("Phone_no").ToString()
textBox5.Text = ds.Tables(0).Rows(i)("City").ToString()
MessageBox.Show("this is first record")

End If

this is my coding in,i want to move next record each time but it shows only one next record,kindly provide me help plz

See More: move to next record each time in

October 28, 2010 at 05:38:21
Static i As Integer = 0

How To Ask Questions The Smart Way

Report •
Related Solutions

Ask Question