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
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm