By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,460 Members | 1,508 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,460 IT Pros & Developers. It's quick & easy.

Table names from an Access or MySQL DB using .NET

P: n/a
Hi guys,

Just want to ask how to get a list of table names from an Access or MySQL db
using .NET, without knowing the db name at design time. Something that is
equivalent to issuing a 'show tables' in SQL statement.

Thanks.
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi,

Have you taken a look at GetOleDbSchemaTable in the OleDb namespace? This
should do what you need.

I hope this helps.
-----------------------------
Nov 16 '05 #2

P: n/a
Hi X-Killer,

OleDbConnection.GetOleDbSchemaTable(...)
.... and it works for OleDb only :(

HTH
Marcin
Hi guys,

Just want to ask how to get a list of table names from an Access or MySQL db
using .NET, without knowing the db name at design time. Something that is
equivalent to issuing a 'show tables' in SQL statement.


I'm affraid that 'show tables' is not SQL standard :(
Nov 16 '05 #3

P: n/a
Thanks guys above for pointing me to the right track, and that solves my
problem. Just curious to ask is there any similar method for the ODBC?

Thanks.

"Marcin Grzębski" <mg*******@taxussi.no.com.spam.pl>
???????:d0**********@nemesis.news.tpi.pl...
Hi X-Killer,

OleDbConnection.GetOleDbSchemaTable(...)
... and it works for OleDb only :(

HTH
Marcin
Hi guys,

Just want to ask how to get a list of table names from an Access or MySQL
db
using .NET, without knowing the db name at design time. Something that
is equivalent to issuing a 'show tables' in SQL statement.


I'm affraid that 'show tables' is not SQL standard :(

Nov 16 '05 #4

P: n/a
Hi,

AFAIK there isn't one. It is only available for OleDb.

Good Luck.
----------------------------------
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.