i have a custom tag called cf_queryBox that i use for this problem.  I
cfinclude my queries most of the time, but if i need to module one, i just
cfmodule querybox and it includes the query file and then copies the
resulting recordset to whatever scope you need it in (probably caller).
this way my queries work either way and i don't suffer the performance loss
if i don't need the box.
www.tbcfug.org for the tag.

ken

-----Original Message-----
From: Brian Kotek [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 2:11 PM
To: [EMAIL PROTECTED]
Subject: RE: Call Fuse with CFMODULE?


In my experience, the overhead of CFMODULE is about 15-20 ms, give or
take.  Not too much until you start piling up lots of CFMODULE calls in
the same request.

-----Original Message-----
From: Tom Schreck [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 1:53 PM
To: [EMAIL PROTECTED]
Subject: RE: Call Fuse with CFMODULE?


I like using cfmodule for calling queries because you can better control
what variables you want that instance of your query to use.  For
instance, if you have a query that can act upon 2 different variables
and you have a situation where both variables are present, your query
will act on both those variables if you cfinclude your query.  You may
not want that instance of your query to act upon both variables.  Using
cfmodule, you have control over what variables your queries act upon
based on what gets passed into the query.  Also, I think it produces
cleaner looking code using cfmodule because you call the variables as
attributes to the cfmodule call versus using a series of cfsets before
the query call.

How much extra time does a call using cfmodule take versus a cfinclude?

Thanks -

Tom Schreck
817-252-4900
[EMAIL PROTECTED]

I have not failed.  I've found 10,000 ways that won't work.

- Thomas Edison


-----Original Message-----
From: John Farrar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 12:36 PM
To: [EMAIL PROTECTED]
Subject: Re: Call Fuse with CFMODULE?

Cfmodule is slower... it takes more overhead... and it does not share
variable scope unless you are passing the data via (request.myQuery,
session.myQuery, or Application.myQuery)...

All that to say... yes you can... but unless you are using cfmx and want
to do it in a CFC... the module is not the common method of making your
application shine.

John Farrar

>>> [EMAIL PROTECTED] 06/20/02 01:07PM >>>
Hi all,

I have the following structure:

Home/
  |hospital/
  |system/
      |state/
         |qry/
           |qry_GetStateInfo.cfm

I have a fuseaction in my hospital circuit that will present a search
screen for the user to find the hospital.  One of the search parameters
I want is a drop-down list of states.  I would like to re-use the
qry_GetStateInfo.cfm fuse instead of writing a new one.

I know I can CFINCLUDE that file, but I was curious if there was a way I
could use something like CFMODULE to "call" that file?

-Troy Murray

==^================================================================
This email was sent to: [email protected]

EASY UNSUBSCRIBE click here: http://topica.com/u/?bUrFMa.bV0Kx9
Or send an email to: [EMAIL PROTECTED]

T O P I C A -- Register now to manage your mail!
http://www.topica.com/partner/tag02/register
==^================================================================




Reply via email to