I think you'll find that that may need to be: <cfset qtext=spanish>
<cfoutput query="#qtext#"> You will need the hashes around 'qtext' for coldfusion to resolve it in to the desired name of your query (i.e. English or Spanish) Regards Rich On 12/4/06, Adrian <[EMAIL PROTECTED]> wrote: > scrap the hashes. > > <cfset qtext=spanish> > > <cfoutput query="qtext"> > > > On 04/12/06, alex poyaoan <[EMAIL PROTECTED]> wrote: > > > > Hi everybody need help on the following: > > > > I have two cfquery which are > > > > <cfquery name="english" datasource="db"> > > select * from lang > > where langid=1 > > </cfquery> > > > > <cfquery name="spanish" datasource="db"> > > select * from lang > > where langid=2 > > </cfquery> > > > > <cfparam name="Session.Lang" default="1"> > > <CFSWITCH expression="#Session.Lang#"> > > > > <cfcase Value="1"> > > <cfoutput> > > <cfset qtext="#english#"> > > </cfoutput> > > </cfcase> > > > > <cfcase Value="2"> > > <cfoutput> > > <cfset qtext="#spanish#"> > > </cfoutput> > > </cfcase> > > </cfswitch> > > > > <cfoutput query="#qtext#"> > > #field1# > > </cfoutput> > > > > the error is coming from cfoutput query which says Complex object types > > cannot be converted to simple values. > > > > IS THERE A WAY TO POST THE QUERY DYNAMICALLY IN THE CFOUTPUT I HAVE BEEN > > TRYING MANY METHODS BUT COULDN'T GET IT.... THANKS > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262686 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

