Well... in one way I think it is ran from the top due to the setting it to
zero and yet when it gets to the output of the area marked bad the number is
ok if I hit the page once but if I hit refresh while it is loading then the
number is incorrect.
Code at bottom of page with LOCKS around ALL SESSION output and cfsets...
I give this is the strangest thing I have ever heard or saw.
Remember Now tested on both
ColdFusion MX on a Solaris 7 with Apache 1.3.26 Web Server
ColdFusion 4.5 on Windows NT with IIS Web Server
>
> Based on the description and the code I see nothing out of
> the ordinary,
> and nothing that won't be solved by adding more locks. Why would you
> think the page is not run from the top?
>
> Jochem
>
<cfapplication name="test"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0, 3, 0,
0)#">
<cfif IsDefined( "Cookie.CFID" ) AND IsDefined( "Cookie.CFTOKEN" )>
<cfset localCFID = Cookie.CFID>
<cfset localCFTOKEN = Cookie.CFTOKEN>
<cfcookie name="CFID" value="#localCFID#">
<cfcookie name="CFTOKEN" value="#localCFTOKEN#">
</cfif>
<cfset request.dsnSQL ="XX">
<cfset request.dsnAS400 ="XXX">
<cflock timeout = "60" scope = "SESSION" type = "Exclusive">
<cfset session.dealer_id="XXXX">
</cflock>
<cflock timeout = "60" scope = "SESSION" type = "Exclusive">
<cfset session.cartquantity=0>
</cflock>
<cflock timeout = "60" scope = "SESSION" type = "Exclusive">
<cfset session.carttotal=0>
</cflock>
<cfoutput>Before Everything:<br>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.Carttotal:#session.carttotal#<br>
</cflock>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.CartQuantity:#session.cartquantity#<br><br>
</cflock>
</cfoutput>
<cfquery name="qry_checkoutcart" datasource="#request.dsnSQL#">
SELECT *
FROM OreckDealerCart
WHERE OreckDealer_id = <cflock timeout = "60" scope = "SESSION"
type="READONLY">#session.dealer_id#</cflock>
</cfquery>
<cfquery name="qry_checkoutcart1" datasource="#request.dsnSQL#">
select sum(quantity) As CartTotal
FROM OreckDealerCart
WHERE OreckDealer_id = <cflock timeout = "60" scope = "SESSION"
type="READONLY">#session.dealer_id#</cflock>
</cfquery>
<cfif qry_checkoutcart.recordcount neq 0>
<cfset counter=0>
<cfoutput>Before Query:<br>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.Carttotal:#session.carttotal#<br>
</cflock>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.CartQuantity:#session.cartquantity#<br><br>
</cflock>
</cfoutput>
<br>
<cfoutput query="qry_checkoutcart">
Before AS400:<br>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.Carttotal:#session.carttotal#<br>
</cflock>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.CartQuantity:#session.cartquantity#<br><br>
</cflock>
<!--- Loop to slow page down. --->
<cfset y=1>
<cfloop index="x" from="1" to="10000">
<cfset y=x*y>
</cfloop>
Quantity 1:#qry_checkoutcart.quantity#
<cflock timeout = "60" scope = "SESSION" type = "Exclusive">
<cfset
session.cartquantity=#session.cartquantity#+#qry_checkoutcart.quantity#>
</cflock>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
Session.CartQuantity:#session.cartquantity# Quantity
</cflock>
2:#qry_checkoutcart.quantity#<br><br>
</cfoutput>
<cfoutput>
<a href="index.cfm?fuseaction=checkout"><img
src="/oreckdealer/images/icons/dealer_cart.gif" border="0" alt="View
Cart"></a>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
#session.cartquantity# Items
</cflock>
<cflock timeout = "60" scope = "SESSION" type="READONLY">
#dollarformat(session.carttotal)# Total
</cflock>
</cfoutput>
</cfif>
<br>
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists