Getting a list of Tables from SQL

  • Thread starter Thread starter J L
  • Start date Start date
J

J L

I have used the OleDb connection GetlOleDbSchema &
OleDbSchemGuid.Tables to get a list of tables from the Access
database. I can not find the equivalent way to get a list of tables
from an SQL database. Please advise how to go about this.

TIA,
John
 
database. I can not find the equivalent way to get a list of tables
from an SQL database. Please advise how to go about this.

Have a look at the INFORMATION_SCHEMA views in SQL Server.

SELECT * FROM INFORMATION_SCHEMA.TABLES

should give you a list of all available tables.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
Thanks Marc. That is what I needed.

John

Have a look at the INFORMATION_SCHEMA views in SQL Server.

SELECT * FROM INFORMATION_SCHEMA.TABLES

should give you a list of all available tables.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
Back
Top