Number of Tables in a Access Database File

A

Akash

Hi
I want to know if a random access(.mdb) file is given to my code how can i
find how many tables are there present in the file??
is there any query or stored proc to do it....
i will be glad if you can consider that i will running the query through a
Java code i mean i am accessng the mdb files in Java

url:http://www.ureader.com/gp/1063-1.aspx
 
M

Marshall Barton

Akash said:
I want to know if a random access(.mdb) file is given to my code how can i
find how many tables are there present in the file??
is there any query or stored proc to do it....
i will be glad if you can consider that i will running the query through a
Java code i mean i am accessng the mdb files in Java


If you have a reference to a data access library. then you
should be able to get DAO db.TableDefs.Count or its
equivalent in ADO.

Not a documented approach, but you could also use a query:

SELECT Count(*) As TblCount
FROM MSysObjects
WHERE Type =1
 
Top