ive never seen naming a query in the session scope....thats definitely a
new one one me.

..tony

Tony Weeg
Senior Web Developer
Information System Design
Navtrak, Inc.
Fleet Management Solutions
www.navtrak.net
410.548.2337 


-----Original Message-----
From: Simon Stanlake [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 27, 2002 1:04 PM
To: CF-Talk
Subject: sessionquery.recordcount


hi,
we have the following code...

        <cfquery name="session.myResults" datasource="#request.ds#">
        select  * 
        from    theTable
        </cfquery>
        
<!--- create an array of 1's to use in queryAddColumn --->
        <cfset defaultValueArray = ArrayNew(1)>
        <cfloop index="i" from="1" to="#session.myResults.recordCount#">
                <cfset defaultValueArray[i] = 1>
        </cfloop>

occasionally, we exit this piece of code and the length of the array is
different from the length of the query.  ie: 

        arraylen(defaultValueArray) != session.myResults.recordCount.

It seems to me that this should never happen.

I've changed the name of the table and the session variable, but
otherwise
the code is a cut-and-paste.  I realize there are a bunch of different
ways
to do this, but I want to know what causes this behaviour.  Has anyone
else
seen something similar?  recordcount not always returning the right
value?
cfloop bailing out early? funniness when storing queries in the session
scope?

thanks,
simon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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