As long as your not on a shared host, or might get into trouble for using
the serviceFactory.
 

-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED] 
Sent: 27 January 2006 18:24
To: CF-Talk
Subject: RE: Geting a list of query column names unsorted.

This'll do it:

<cfset obj = CreateObject("JAVA", "coldfusion.server.ServiceFactory")>

<cfquery name="q" datasource="myDS">
        SELECT * FROM Event
</cfquery>

<cfdump var="#q.getMetaData().getColumnLabels()#">

Adrian

-----Original Message-----
From: Jim Davis [mailto:[EMAIL PROTECTED]
Sent: 27 January 2006 18:02
To: CF-Talk
Subject: RE: Geting a list of query column names unsorted.


> -----Original Message-----
> From: Oleg Gunkin [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 27, 2006 12:53 PM
> To: CF-Talk
> Subject: Geting a list of query column names unsorted.
>
> 'query_name.columnlist' returns a sorted list of column names, but I 
> really need it to be unsorted because for the query 'select c, a, b 
> from t' I need 'c,a,b' list, NOT 'a,b,c'. How do I get an unsorted 
> list of columns?

Which version of CF are you using?  I coulda swore than MX+ did return the
columnnames in query order.

Jim Davis







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230614
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to