Did you want the list of field names returned in your query or did you want
the columns available in the DB table?
For the query, use #myquery.columnlist#
For the DB, try this (works for SQL Server Only):
<CFSET TableName = "#tablename">
<CFSTOREDPROC PROCEDURE="sp_columns" DATASOURCE="#datasource#">
<CFPROCPARAM TYPE="In" CFSQLTYPE="CF_SQL_VARCHAR"
DBVARNAME="@table_name"
VALUE="#TableName#"
NULL="No">
<CFPROCRESULT NAME="First" RESULTSET="1">
</CFSTOREDPROC>
<TABLE>
<CFOUTPUT QUERY="First">
<TR>
<TD>#Column_Name#</TD>
<TD>#Type_Name#</TD>
<TD>#Length#</TD>
<TD>#Nullable#</TD>
<TD>#Column_def#</TD>
</TR>
</CFOUTPUT>
Jeff
-----Original Message-----
From: Shawn Regan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 10, 2002 12:11 PM
To: CF-Community
Subject: RE: Refuting Insane Claims
I'm drawing a blank on how to get the field names from a database
dynamically. QUERY.columnames?? something like so??
Shawn Regan
Applications Developer
Pacific Technology Solutions
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists