troubleshooting Question

Element RECORDCOUNT is undefined in CATEGORIES.

Avatar of pigmentarts
pigmentartsFlag for United Kingdom of Great Britain and Northern Ireland asked on
Web Servers
4 Comments1 Solution1171 ViewsLast Modified:
Error: Element RECORDCOUNT is undefined in CATEGORIES

But it is there and word on my other site why am i getting this error now below is my code and sql!

TOP--------------------------

<cfif IsDefined('URL.catId')>
      <cfinvoke method="getCategory" component="#component#" returnvariable="category">
      <cfinvoke method="getProducts" component="#component#" returnvariable="products">
</cfif>

CODE---------------------

 <cfoutput>
<cfif IsDefined('URL.catID')>


      <cfif categories.recordCount GT 0>
            <div class="header">#department.name#</div>
            <p>Please select a category.</p>
            <ul>
                  <cfloop query="categories">
                  <li><a href="product_list.cfm?catId=#catId#">#name#</a></li>
                  </cfloop>
            </ul>
            <cfelse>
            <p>There are no products in this department </p>
                  </cfif>
                  
                  <cfelse>
                  <p>This Department Doesn't Exist</p>




</cfif>
</cfoutput>

SQL -------------------------------

<cffunction name="getCategories" returntype="query" hint="get categories">
      <cfquery name="categories" datasource="#dbSource#">
            SELECT catId, name FROM categories WHERE depId = '#URL.depId#'
      </cfquery>
      <cfreturn categories>
</cffunction>


Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros