Skip to main content
Inspiring
June 11, 2009
Question

recordcount on str.Proc. result

  • June 11, 2009
  • 1 reply
  • 780 views

When my str. Proc. returning a query result and I use cfdump to see the resultset I can see it displays in my screen just fine.

but if the result of str. proc. is 0 my code throw an error :

Element RECORDCOUNT is undefined in Q_my_strproc_name.

The error points to the following code:

<cfif Q_my_strproc_name.recordcount NEQ 0>

......etc

How can I prevent error when the str proc. does not return any result if I can't use  Q_my_strproc_name.recordcount?

Thank you for any help.

This topic has been closed for replies.

1 reply

Dileep_NR
Inspiring
June 12, 2009

Hi,

Please try this,

<cfif isdefined("Q_my_strproc_name") AND Q_my_strproc_name.recordcount GT 0>
   
    --------------
    --------------
</cfif>