Validation error for tag cfloop
Hi All,
Complete newbie to CF here. I've inherited (or bought) an online business which has its site written in CF. I haven't done this sort of stuff before but do work SQL for a living and object oriented stuff plus have done a bit of html and php so CF isn't mind blowing to me (in its simple form).
I've downloaded my site on to my computer to run a local copy that I can hack to pieces if needs be. For some reason, I have a few problems with the site running locally. The first error I'm getting is a Attribute validation error for tag cfloop.
Basically, index.cfm has this bit of code in it:
<cfinvoke component="#datasets#" method="storedProcedure" returnvariable="getFeaturedWineries_qry">
<cfinvokeargument name="storedProcedure" value="usp_GetFeaturedWineries">
</cfinvoke>
Ok, easy enough. Anyway, there's a call down the page to:
<cfinclude template = "#REQUEST.CFMPath#includes/displayFeaturedWineries.cfm">
Within displayFeaturedWineries.cfm is the code that calls the stored proc invoked above:
<cfloop query="getFeaturedWineries_qry" startrow="1" endrow="2">
Bam, that's where the error occurs. "The value of the attribute query, which is currently getFeaturedWineries_qry, is invalid.
What??? The stored proc exists and it only returns two records (which begs me to wonder why you would have startrow and endrow but anyway, it doesn't work with or without it).
The other interesting thing is that this works on production, NO PROBLEM!!! WTF? How can it work on production but not locally.
The only thing I'm starting to think is:
a) I've missed a setting somewhere in CF or
b) I'm running Apache as compared to IIS or
c) I'm running SQL 2008 and CF 9 which will no doubt be different to the production host server.
Should B or C be causing THAT type of problem??
Thanks,
Matt
