Wrox Home  
Search P2P Archive for: Go

  Return to Index  

ado_dotnet thread: Retreiving Database Table Names and Fields using ADO.Net


Message #1 by "ola" <ola_ogun@b...> on Thu, 5 Sep 2002 17:54:11 +0100
Hello Everybody

I need to retrieved the tables names and fields of an Access 2000
database into a treeView any help or direction will be greatly
appreciated


Regards
Ola


Message #2 by "Andrew Hazell" <andrew.hazell@a...> on Wed, 18 Sep 2002 21:52:02
To get the table names in your database do the following:
1) Open your database in Access 2000.
2) Choose menu path Tools->Options. Within the view tab there is a 
checkbox to show System objects, tick it.
3) Now you should be able to see a table called MSysObjects. Run a SQL 
query on this table to get a list of your tables.

Eg:

SELECT Name
  FROM MSysObjects
 WHERE Type = 1

  Return to Index