Print Page | Close Window

Tables

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=13591
Printed Date: 30 March 2026 at 4:19am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Tables
Posted By: felix.akinyemi
Subject: Tables
Date Posted: 31 January 2005 at 8:31pm
Just a little help!!
 
Is there a way to list all the tables in an access database on a web page!!
 
Not lost the records, but the actual tables!!



Replies:
Posted By: michael
Date Posted: 31 January 2005 at 9:59pm
The following query should do it for you
Select name from MSysObjects where type=1 and flags=0


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: dj air
Date Posted: 01 February 2005 at 4:39am
have you set the tables to hidden, if you go to options on the menu, in one of the tabs there is shows hidden itemts/objects.


Posted By: felix.akinyemi
Date Posted: 01 February 2005 at 9:10am
^^ No the tables are not hidden
 
 
Originally posted by michael michael wrote:

The following query should do it for you
Select name from MSysObjects where type=1 and flags=0
how will i write it out... e.g, to list fields, you write rs.Fields("xxx")
 
how do i write out one for tables!!


Posted By: michael
Date Posted: 01 February 2005 at 10:14am
rs.Fields("name")

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: felix.akinyemi
Date Posted: 01 February 2005 at 10:29am
Ok, you not quiet getting what i mean... lol...
 
ok, say from from the forum database (access)
 
i want to be able to list all the tables...
 
e.g.
 
  • tblAuthor
  • tblBanList
  • tblBuddyList
  • tblCategory
  • tblConfiguration
  • tblDateTimeFormat

and so on... that what im talking about, i guess i should have explain properly earlier!!



Posted By: dj air
Date Posted: 01 February 2005 at 10:40am
hes correct do the query as sugested then do #

do while not rs.EOF

response.write (rs("name") & "<br/>")

rs.movenext
loop

resplace rs with the name of the connection you have open


Posted By: felix.akinyemi
Date Posted: 01 February 2005 at 11:25am
ok, from his query what goes in place of name
 
Select name from MSysObjects where type=1 and flags=0


Posted By: dj air
Date Posted: 01 February 2005 at 11:37am
name stays the say.

the name of the table is called name

so that is orrect.


Posted By: felix.akinyemi
Date Posted: 01 February 2005 at 11:47am
im getting this error
 

 

Microsoft JET Database Engine error '80040e09'

Record(s) cannot be read; no read permission on 'MSysObjects'.

/tables.asp, line 16

 
and line 16 is
 
rs.Open strSQL, adoCon
 
and my query is
 
 
strSQL = "SELECT NAME FROM MSysObjects WHERE TYPE=1 AND FLAGS=0"


Posted By: michael
Date Posted: 01 February 2005 at 4:25pm
You need to open the database with the admin account. I think when you use external connections you should specify even if there is no password that you connect via admin like user="admin";password="";

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net