如何移动到vb.net中的记录? [英] How to move to the records in vb.net?
本文介绍了如何移动到vb.net中的记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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?
推荐答案
谷歌用于BindingNavigator用于自动化解决方案或BindingSource用于更多控制但也更多你的工作。
Google for "BindingNavigator" for an automated solution or "BindingSource" for more control but also more work on your part.
这篇关于如何移动到vb.net中的记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文