Gotcha, thanks for the tip.

IGOR  ILYINSKY
CREDIT|FIRST
SUISSE|BOSTON
GLOBAL WEB SERVICES
      (212) 892-9314
              4-9314
-----Original Message-----
From: Raymond Camden [mailto:jedimaster@;macromedia.com]
Sent: Thursday, November 07, 2002 10:38 AM
To: CF-Talk
Subject: RE: CFC - Returning a Query Subset


>       Did you mean ItemSearchResults[QueryItem][CurrentRow]? 
> The original query, not the subset right?

Yea - the original query. Sorry if I typoed!

>       Exactly what should be declared with a VAR statement? 
> you mean like "TEMPVAR"? or "ItemSearchResultsSubSet"? 


There is a very simple rule for this - and it applies to UDFs as well.

If you define a variable in the method, you must VAR it. Don't forget
that cfquery generates a new variable as well, you should var scope it
as well.

<cffunction .....>
        N <cfarg tags>
        <cfset var x = 1>
        <cfset var getMoo = "">

        <cfquery name="getMoo" ....>
        </cfquery>

        <cfloop index="x" from=1 to="#getMoo.recordCount#">
        ....
        </cfloop>
</cffunction>

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Hire

Email    : [EMAIL PROTECTED]
WWW      : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to