I beleive this is the case ALWAYS even if the 2 queries have seperate names
and fields.  This "feature" is there to prevent the issue I mentioned.  It
forces you to properly reference your variables ;-)

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]

---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: "Jeff D. Chastain" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, December 02, 2002 2:39 PM
Subject: RE: Nested Query Loops


> I can see that ... The issue is that I have two differently named
> queries with differently named columns.  The CF error is that the inner
> query does not even exist, which is verified with a <cfdump prior to the
> inner loop.   For some reason, that query variable goes to null within
> the outside loop.
>
> -- Jeff
>
>
> -----Original Message-----
> From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 02, 2002 4:34 PM
> To: CF-Talk
> Subject: Re: Nested Query Loops
>
>
> Well...think about your nested loop having fieldnames that same as the
> outer loop....
>
> CF has to know which field you are referencing ;-)
>
> Bryan Stevenson B.Comm.
> VP & Director of E-Commerce Development
> Electric Edge Systems Group Inc.
> t. 250.920.8830
> e. [EMAIL PROTECTED]
>
> ---------------------------------------------------------
> Macromedia Associate Partner
> www.macromedia.com
> ---------------------------------------------------------
> Vancouver Island ColdFusion Users Group
> Founder & Director
> www.cfug-vancouverisland.com
> ----- Original Message -----
> From: "Jeff D. Chastain" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, December 02, 2002 2:30 PM
> Subject: RE: Nested Query Loops
>
>
> > I was referring to the inner query using the full scoped name -
> > variables.queryName.
> >
> > So, why does setting newQueryName = variables.queryName PRIOR to
> > looping the first query change anything?  Both variables are in the
> > variable scope and are created prior to the first loop - they should
> > be the same right?
> >
> > BTW - copying the query over to a new name worked.  Now the question
> > is why?
> >
> > Thanks
> >
> >
> > -----Original Message-----
> > From: Keith Dodd [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, December 02, 2002 3:17 PM
> > To: CF-Talk
> > Subject: Nested Query Loops
> >
> >
> > Not sure this is the problem, but I've had problems with nesting
> > loops, forgetting that you need to set a variable from the outer loop
> > (with a new name) before using that variable in the inner loop. I
> > don't understand why, but variables get confused in nested loops. This
>
> > *might* have something to do with it.
> >
> > Keith Dodd
> >
> >
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

Reply via email to