I just do:

<cffunction name="foo" returntype="query">
<cfset var local=structNew() />
<cfquery name="local.getUsers">
select * from users
</cfquery>
<cfreturn local.getUsers />
</cffunction

On 6/23/05, Salvatore Fusto <[EMAIL PROTECTED]> wrote:
Hi,
do you mean writing:

<cfset var q_name="my query" />
<cfquery name="#q_name#" ...>
..
instead of a simple
<cfquery name="q_query" ../>
?
regards
salvatore
----- Original Message -----
From: "Sean Corfield" <[EMAIL PROTECTED]>
To: <[email protected] >
Sent: Thursday, June 23, 2005 6:21 PM
Subject: Re: [CFCDev] Returning a Query from Application Scoped CFC


On 6/23/05, Gurevich, Gerry (NIH/NIEHS) <[EMAIL PROTECTED] > wrote:
> I'm using an application scoped CFC to return a recordset.  It works fine
> in
> my development environment.  Do I need to worry about the site under load.
> If multiple users are using the same CFC at the same time, will they each
> have their own unique query to work with, or will they interfere with one
> another.

As long as you have 'var'-declared all your local variables, you'll be
fine. But make sure you 'var'-declare the variable specified in the
name= attribute of your <cfquery> tags.
--
Sean A Corfield -- http://corfield.org/
Team Fusebox -- http://fusebox.org/
Got Gmail? -- I have 50, yes 50, invites to give away!

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to
[email protected] with the words 'unsubscribe cfcdev' as the subject of the
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to