Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View Db objects with recordset

Status
Not open for further replies.

duckweb

Programmer
Mar 4, 2003
12
US
Ok...i have seen this somewhere before, but forgot how to do it...I need to use ASP to view all table names in a given database...I know there is some SQL that allows this.

Any ideas?

 
It would help alot if you said what type of database you are working with. THey all tend to be different :)

If you were working with SQL Server it is the database.dbo.sysobjects table where type = 'u'

with access you query the database object...

It is all different

Rob


 
Your question should be asked in the forum for the specific database. Click the "Forum List" link in the top left corner of the site and find your database in the list.

-pete

 
>I need to use ASP to view all table names in a given database.
Code:
   dim aaTables
   dim adoxconn
   dim x
   dim y

   set adoxconn = server.createobject("ADOX.Catalog")
   adoxconn.activeconnection = conn

   '*** The Following is for Debugging ONLY!!! ***
   for each x in adoxconn.tables
      if(x.type="TABLE")then
         response.write(&quot;<hr><p><b><u>&quot; & x.name & &quot;</u></b></p>&quot;)
         for each y in x.columns
            response.write(&quot;<p><b>&quot; & y.name & &quot;</b> Type=&quot; & y.type & &quot; size=&quot; & y.definedsize & &quot;</p>&quot;)
         next
      end if
   next

   set adoxconn = Nothing

Good Luck! [thumbsup2]
WindUp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top