473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Table names from an Access or MySQL DB using .NET

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
4 2612
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
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
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
Hi,

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

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Margaret MacDonald | last post by:
It appears that the 'table.field' dot notation is not preserved by php's mysql library. I can create some join 'SELECT a.id, b.id FROM table1 AS a, table2 AS b' but when I try to refer to the...
4
by: Bruce A. Julseth | last post by:
My MySQL.user table (user, host, password) looks like the following: +---------+-----------+---------------------+ | user | host | password |...
0
by: B. Fongo | last post by:
I learned MySQL last year without putting it into action; that is why I face trouble in formulating my queries. Were it a test, then you would have passed it, because your queries did help me...
1
by: David | last post by:
Hi, I currently administer our MySQL db version 3.23.56 on a Linux Cobalt Qube server via an external fron-end piece of software. My Table Names have capital letters at the beginning, i.e....
1
by: Noah Bawdy | last post by:
This should be a <duh> but I can't find the answer. For example: SELECT Company_Defaults.CompanyID, Company.CompanyID FROM Company_Defaults Left Join Company on Company_Defaults.CompanyID =...
3
by: steve | last post by:
Hello, I am trying to take all the data from one table and transfer it to another table with exactly the same column names in the same database. I have done this with a small sql script in an...
6
by: Kevin Chambers | last post by:
Hi all-- In an attempt to commit an Access MDB to a versioning system (subversion), I'm trying to figure out how to convert a jet table's metadata to text, a la SaveAsText. The end goal is to...
6
by: frank78 | last post by:
Hi everyone, I am having a little bit of trouble backing up some mySQL tables. I've been trying to adapt a script I found on the internet at...
4
by: Bob | last post by:
Hi all, I've got a table that I've imported and it has junk at the top of the table, so after import I run a delete query to remove the junk lines then I'm left with the field names I want for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.