Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Obtaining a list of tables in an ODBC database

Status
Not open for further replies.

justinhanson

Programmer
Feb 7, 2005
2
CA
Hi,

From VB.NET, I need to obtain a list of all of the tables that exist in an ODBC database.

Can anyone please tell me how this can be done?

Thanks!


 
Depends on the ODBC database. For SQL Server 2000, an SQL call of
Code:
EXECUTE sp_tables
will do it (includes system tables). You may need a separate subclass for each database type if you need to be flexible enough to work with multiple database vendors and/or products.
 
You will want to look at the schema for the table. Do a google search for an example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top