You will need to use Information_Schema for this

EX:

    <cfswitch expression="#driver#">
        <cfcase value="MSSQLServer">
            <cfquery name="qTables" datasource="#form.dsn#">
                SELECT    *
                FROM    Information_Schema.Tables
                WHERE    table_type = 'BASE TABLE'
                AND        table_name <> 'dtproperties'
                ORDER BY Table_Name
            </cfquery>
        </cfcase>
        <cfcase value="MySQL5">
            <cfquery name="qTables" datasource="#form.dsn#">
                SELECT    *
                FROM    Information_Schema.Tables
                WHERE    table_type = 'BASE TABLE'
                AND    table_name <> 'dtproperties'
                AND    table_schema = '#form.dsn#'
                ORDER BY Table_Name
            </cfquery>
        </cfcase>
    </cfswitch>

On Wed, Feb 20, 2008 at 6:22 PM, Richard White <[EMAIL PROTECTED]> wrote:

> hi, i am running a query and need to get the columns in the exact order
> they are in, in the database.
>
> for example, i have a table that has the following columns, in the
> following order:
>
> projectID
> subjectID
> Q_225
> Q_226
>
> but if i reference then through queryname.columnlist it gives it to me in
> this order
>
> PROJECTID
> Q_225
> Q_226
> SUBJECTID
>
> i have just noticed as well that the column names are all in upper case
> but i need them to be exactly how they are in the database
>
> i would appreciate any help you can give me
>
> thanks
>
> richard
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

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

Reply via email to