如何在数据库中列出表? [英] How Can I List Tables in a DB?

查看:76
本文介绍了如何在数据库中列出表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是VS.NET 2003,VB.NET,ADO.NET和Access 2000数据库。我想要

来显示Access数据库中所有表的列表。我想把这个表名列表放在一个列表框中,这样用户就可以选择他们想要的表来使用
。我怎么能这样做?


-

---------------------- --------------

Wayne Wengert
wa *** @ wengert.org

解决方案

查看 http://www.aspfree.com/examples/544,1/examples.aspx

查看是否帮助

问候

Sushila

..NET MVP


" Wayne Wengert" < WA *** @ wengert.org>在消息新闻中写道:eM ************** @ TK2MSFTNGP09.phx.gbl ...

我使用的是VS.NET 2003,VB.NET,ADO .NET和Access 2000数据库。我想
显示Access数据库中所有表的列表。我想将表名列表放在列表框中,以便用户可以选择他们想要使用的表。我怎么能这样做?

-
------------------------------ ------
Wayne Wengert
wa***@wengert.org




感谢您的指针。我将使用该示例,看看我是否可以将其改编为我的Windows窗体应用程序。我不知道AllTables和AllTables。参数 -

是我认为我需要的。


Wayne


" Sonali.NET [MVP ]" < XB ******** @ hotmail.com>在留言中写道

news:eK ************* @ TK2MSFTNGP10.phx.gbl ...

查看 http://www.aspfree.com/examples/544,1/examples。 aspx

看看是否有帮助

问候

Sushila

..NET MVP

" Wayne Wengert" < WA *** @ wengert.org>在消息中写道

新闻:eM ************** @ TK2MSFTNGP09.phx.gbl ...

我正在使用VS. NET 2003,VB.NET,ADO.NET和Access 2000数据库。 I
想要显示Access数据库中所有表的列表。我想将表名列表放在列表框中,以便用户可以选择他们想要使用的表。我怎么能这样做?

-
------------------------------ ------
Wayne Wengert
wa***@wengert.org



好主意。我会玩那个


Wayne


< Rick" < RI ** @ NOSPAM.computetosuit.com>在消息中写道

新闻:大江************** @ tk2msftngp13.phx.gbl ...

你可能想看看在MSysObjects表中。它是一个访问表
,它列出了数据库的所有对象。我很确定表的Type
列是1,并且所有系统表都被命名为MSys *,所以你应该能够看到所有表格。

" Wayne Wengert" < WA *** @ wengert.org>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP12.phx.gbl ...

Sonali;

事实证明,该示例中的语法不适用于Access

DB。我试图找到正确的方法在Access中执行此操作而不必使用$ block $ class =post_quotes>返回ADOX。

Wayne

" Sonali.NET [MVP] QUOT; < XB ******** @ hotmail.com>在消息中写道
新闻:eK ************* @ TK2MSFTNGP10.phx.gbl ...
查看 http://www.aspfree.com/examples/544,1/examples.aspx
看看是否有帮助
问候
Sushila
.NET MVP

Wayne Wengert < WA *** @ wengert.org>在消息中写道
新闻:eM ************** @ TK2MSFTNGP09.phx.gbl ...

我正在使用VS.NET 2003,VB .NET,ADO.NET和Access 2000数据库。我


想要

来显示Access数据库中所有表的列表。我想把


表名列表放在一个列表框中,这样用户就可以选择他们想要

的表格


使用。我怎么能这样做?

-
------------------------------ ------
Wayne Wengert
wa***@wengert.org





I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want
to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want
to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.org

解决方案

Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
..NET MVP

"Wayne Wengert" <wa***@wengert.org> wrote in message news:eM**************@TK2MSFTNGP09.phx.gbl...

I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want
to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want
to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.org




Thanks for that pointer. I''ll use that sample and see if I can adapt it to
my Windows Form app. I did not know about the "AllTables" parameter - that
is what I think I need.

Wayne

"Sonali.NET[MVP]" <xb********@hotmail.com> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
..NET MVP

"Wayne Wengert" <wa***@wengert.org> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...

I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I want to display a list of all tables in an Access database. I want to put that
list of table names in a listbox so the user can select the table they want to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.org



Good idea. I''ll play with that

Wayne

"Rick" <ri**@NOSPAM.computetosuit.com> wrote in message
news:Oe**************@tk2msftngp13.phx.gbl...

You might want to look at the MSysObjects table. It is an access table that lists all the objects for the database. I am pretty sure that the Type
column is 1 for table, and all the system tables are named "MSys*", so you
should be able to see all the tables that way.
"Wayne Wengert" <wa***@wengert.org> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...

Sonali;

It turns out that the syntax in that example does not work against an Access

DB. I am trying to find the right way to do this in Access without having to

go back to ADOX.

Wayne

"Sonali.NET[MVP]" <xb********@hotmail.com> wrote in message
news:eK*************@TK2MSFTNGP10.phx.gbl...
Check out http://www.aspfree.com/examples/544,1/examples.aspx
See if it helps
Regards
Sushila
.NET MVP

"Wayne Wengert" <wa***@wengert.org> wrote in message
news:eM**************@TK2MSFTNGP09.phx.gbl...

I am using VS.NET 2003, VB.NET, ADO.NET and an Access 2000 database. I


want

to display a list of all tables in an Access database. I want to put


that list of table names in a listbox so the user can select the table they


want

to use. How can I do this?

--
------------------------------------
Wayne Wengert
wa***@wengert.org





这篇关于如何在数据库中列出表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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