Hi, Matthew, and thanks for the reply...
As you can see from the code, I wasn't setting a default...is that
necessary?
In the code, if session.cart is not defined, then the code runs to define
it...
Anyway, I was using the "Quickstore" example from the 4.0 book and it didn't
set a default,
but rather set up the code like I did.
This was running fine last night, but this morning I'm getting that
error...the sessiontimeout is
set to 1 day...let's see...what else...I have a previous bit of trial code
that runs that does the same
thing as the code below...creates session.cart query...adds a row...inserts
data...loops query...all runs fine today.
But the code below keeps giving that error... :o(
Rick
> -----Original Message-----
> From: Smith, Matthew P -CONT(CSC)
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 18, 2003 9:49 AM
> To: CF-Talk
> Subject: RE: Why am I getting this "not an available query" error?
>
>
> What is application.cfm defaulting it to? Perhaps the
> default value you are setting is not a valid query/structure?
>
>
>
> -----Original Message-----
> From: Rick Faircloth [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 18, 2003 8:55 AM
> To: CF-Talk
> Subject: Why am I getting this "not an available query" error?
>
> Good morning...
>
> CF 4.5 / Win 2000 Pro
>
> Trying to setup a shopping cart and was doing fine last
> night testing this
> code.
> This morning when I start running it, I get the error message:
> (The CFLOOP at 21:1 to 21:29 is the <CFLOOP
> Query="Session.Cart"> at the
> bottom)
>
> Why would the Session.Cart query suddenly not be available?
> The Application.cfm should be creating it, even if it's
> undefined.......????
>
> Rick
>
> -------------------------------------------------------------
> ---------------
> -------------
>
> Error Diagnostic Information
> QUERY
>
> The QUERY attribute of the tag does not specify the name of
> an available
> query
>
> The error occurred while processing an element with a
> general identifier of
> (CFLOOP), occupying document position (21:1) to (21:29).
>
> -------------------------------------------------------------
> ---------------
> --------------------------
>
>
> - SessionManagement is enabled
>
>
> - Code from Application.cfm
>
> <CFIF Not IsDefined("Session.Cart")>
>
> <CFSET Session.Cart =
> QueryNew("PhotoFileName, Quantity,
> Size, Amount")>
>
> </CFIF>
>
>
> - Code from event_photo_cart.cfm
>
> <CFIF Form.Size4x6 is not "0">
>
> <CFLOCK Scope="Session" Type="Exclusive"
> TimeOut="5">
>
> <CFSET Temp = QueryAddRow(Session.Cart)>
> <CFSET Temp = QuerySetCell(Session.Cart,
> "PhotoFileName", "<CFOUTPUT>#Form.PhotoFileName#</CFOUTPUT>")>
> <CFSET Temp = QuerySetCell(Session.Cart,
> "Quantity", "<CFOUTPUT>#Form.Size4x6#</CFOUTPUT>")>
> <CFSET Temp =
> QuerySetCell(Session.Cart, "Size",
> "4 x 6")>
> <CFSET Temp = QuerySetCell(Session.Cart,
> "Amount",
> "<CFOUTPUT>#DollarFormat(Evaluate(Form.Size4x6*3.95))#</CFOUTPUT>")>
>
> </CFLOCK>
>
> </CFIF>
>
> <CFLOOP Query="Session.Cart">
> <CFOUTPUT>
> PhotoFileName: #PhotoFileName# &n
> bsp; Quant
> ity: #Quantity# Size:
> #Si
> ze# Amount: #Amount#
> </CFOUTPUT>
> </CFLOOP>
>
> <CFABORT>
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ~~~~~~~~|
> Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137471
> Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
> Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
> Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=708.628.4
This list and all House of Fusion resources hosted by CFHosting.com. The
place for dependable ColdFusion Hosting.
http://www.cfhosting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137476
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
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