开发者

vb.net retrieving information from access to list box

Am using MS Access as my back end and I am having a table called "Dept" with 2 columns (dename & cname). In Vb.Net when I click a com开发者_开发问答mand button, all the data's of the first column should be displayed in ListBox1 and the Second column in ListBox2. I do not know how to proceed, Can any one help ?


why not do something like this.

dim data as datatable = (function to retrive information)

Listbox1.datasource = data
Listbox.DataTextField = "ColumnName1"
Listbox1.databind()

Listbox2.datasource = data
ListBox2.DataTextField = "ColumnName2"
Listbox2.databind()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜