A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SQL Command to List all Tables?



 
 
Thread Tools Display Modes
  #1  
Old February 15th, 2007, 02:51 AM posted to microsoft.public.access.queries
Harry Whitehouse
external usenet poster
 
Posts: 2
Default SQL Command to List all Tables?

I'm trying to read an Access database from a C++ program and get a list of
the table names in the target MDB. I've done this with SQL Server with this
command which invokes a stored procedu

sp_help

How does one to this in Access?

TIA

Harry



  #2  
Old February 15th, 2007, 02:46 PM posted to microsoft.public.access.queries
stumac
external usenet poster
 
Posts: 165
Default SQL Command to List all Tables?

Access objects are stored in a table called MsysObjects and each type of
object has a different type number, a table is one. To see a list of all
tables you could use the following SQL:

SELECT Name
FROM MsysObjects
WHERE (((Type)=1));

This will include system tables so to exclude them you could use:
SELECT Name
FROM MsysObjects
WHERE (((Type)=1) AND ((Name) Not Like "msys*"));



Hth

Stu

"Harry Whitehouse" wrote:

I'm trying to read an Access database from a C++ program and get a list of
the table names in the target MDB. I've done this with SQL Server with this
command which invokes a stored procedu

sp_help

How does one to this in Access?

TIA

Harry




  #3  
Old February 15th, 2007, 02:52 PM posted to microsoft.public.access.queries
Harry Whitehouse
external usenet poster
 
Posts: 2
Default SQL Command to List all Tables?

Stu -- You 'da man!!

Thanks so much!

Harry


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.