There may be an easier way, depending on your database server. Check the ocumentation for your database server to see if there's a table in each database that describes the structure of the database. In SQL Server, it's a table called sysobjects, and it holds records describing all the tables, constraints, views, etc. You could query it like this:
Code:
<cfquery name="qryDBTables" datasource="myDSN" dbtype="ODBC">
SELECT name
FROM sysobjects
WHERE xtype='U'
</cfquery>
In this case, I selected xtype='U' because I wanted user tables. Other values for xtype seem to be S for system table, P for stored procedures, V for views, PK for primary key constraints, and F for foreign key constraints.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.