Bob, a quick tip on CfQuery. If use a SELECT * you can get at list of the
columns of a table using the #Queryname.ColumnList# syntax
Try this:
<cfquery name="qgetschema" datasource="Yourdsn">
SELECT *
FROM INFORMATION_SCHEMA.Columns
WHERE table_name = 'yourtablename'
</cfquery>
<cfoutput>qgetschema.ColumnList</cfoutput>
CFdump will return the column headers as well.
HTH
G
On Mon, Mar 30, 2009 at 3:29 PM, Brian Kotek <[email protected]> wrote:
>
> How to put what into a .cfm file? If you want to get column data for a
> table, you can simply run a query against the information_schema table:
>
> SELECT *
> FROM INFORMATION_SCHEMA.Columns
> WHERE table_name = 'yourtablename'
>
> The CFC shows one way you can do this and encapsulate it (and other related
> behavior) into a single, reusable object. Pointing you to it was most
> likely
> just to give you a starting point if you wanted to go down that road. If
> you're unfamiliar with CFCs, trying to use it is probably not the best idea
> since it is part of a larger project.
>
>
>
> On Mon, Mar 3
>
--
Gerald Guido
http://www.myinternetisbroken.com
"To invent, you need a good imagination and a pile of junk."
-- Thomas A. Edison
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4