Heh.. I'm an idiot. Maybe I should read the message a little more closely :)
-----Original Message----- From: Rick Faircloth [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:52 AM To: CF-Talk Subject: RE: Why am I getting this "not an available query" error? Thanks for the tip, Jeff, but that returned another type of error about the variable not being a "simple" variable... I think I found the answer, however...I moved some of the lines of code around, specifically placing the CFLOCK's outside of all the code below on the event_photo_cart.cfm page and that seemed to do the trick. Looking at the code below, I didn't have CFLOCK's around the <CFLOOP Query="Session.Cart"> line and CF wasn't complaining about the lack of CFLOCK's... But when I put the locks completely outside the code below, it worked. I think, it had to do with placing the first CFLOCK inside a <CFIF>...</CFIF> statement grouping. I've found on other occasions that CF doesn't like either the <CFLOCK> or the closing </CFLOCK> inside of a <CFIF>...</CFIF> with the other part of the tag outside... I moved several things around and not sure if that was it...but at least now it's working! Thanks! Rick > -----Original Message----- > From: Jeff Beer [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 18, 2003 10:24 AM > To: CF-Talk > Subject: RE: Why am I getting this "not an available query" error? > > > First, try using: > > <CFLOOP Query="#Session.Cart#"> > > CF needs to know that "Session.Cart" is a variable. > > -----Original Message----- > From: Rick Faircloth [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 18, 2003 9: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; Q > uant > ity: #Quantity# Size: >   > ;#Si > ze# Amount: #Amount# > </CFOUTPUT> > </CFLOOP> > > <CFABORT> > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~| > Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137481 > 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 > > 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 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137492 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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

