获取表名称到组合框 [英] get table names to combo box

查看:59
本文介绍了获取表名称到组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友.

我需要将所有表名都添加到combobox.But我不知道.我正在使用vb.net

hi friends.

I need get all of table names to combobox.But i have no idea. i am using vb.net

推荐答案

您必须从数据库中获取表名,然后将表名添加到组合框中,请参见此处
-用于获取架构详细信息.
http://msdn.microsoft.com/en-us/library/ms254934(VS .80).aspx [ ^ ]
-添加到组合框
You have to get the tables names from database , then add the table names to combo box, see here
--For getting schema details.
http://msdn.microsoft.com/en-us/library/ms254934(VS.80).aspx[^]
-- add to combobox
foreach (DataTable dt in ds.Tables)
  {
    comboBox1.Items.Add(dt.TableName[0]);
  }



谢谢
--RA



Thanks
--RA


引用此链接.可能会对您有帮助.
http://www.programmersheaven.com /mb/VBNET/365709/365709/adding-name-to-combo-box-in-vbnet-2005/ [
Refer this link. It may help you.
http://www.programmersheaven.com/mb/VBNET/365709/365709/adding-name-to-combo-box-in-vbnet-2005/[^]


这篇关于获取表名称到组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆