I figured it out just as soon as i sent my email.  I just needed 
something quick and dirty so i could print out the structure.

Code i used below.

<style>
li {margin-left:25px;}
</style>
<cfquery name="dump" datasource="datasource">
SHOW TABLES
</cfquery>


<cfloop query="dump">
<cfoutput>
<strong>#tables_in_datasource#</strong>
</cfoutput>
<cfquery name="dump2" datasource="datasource">
SHOW COLUMNS
FROM #tables_in_datasource#
</cfquery>
<cfoutput query="dump2">
                        <ul>
                            #field#
                            <li>Key: #key#</li>
                            <li>Null: #null#</li>
                            <li>Type: #type#</li>
                            <li>Default: #default#</li>
                        </ul>
</cfoutput>
</ol>
</cfloop>

Casey Dougall wrote:
> On Nov 17, 2007 2:25 PM, Steve Good <[EMAIL PROTECTED]> wrote:
>   
>> I am drawing a blank here.  How do I dump the names of all the tables in
>> a database and the columns in each of the tables?  I know how to dump
>> the columns and rows from a specified table, but that's not what i want
>> to do.  What I'm trying to do is create a printable database structure
>> list without the row data.
>>
>> Thanks in advance!
>> ~Steve Good
>>
>>     
> Coldfusion 8...
>
> <cfdbinfo datasource="dsnName" name="DB" type="tables">
>
> <cfdump var="#db#">
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293548
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to