March 3rd, 2005, 09:49 AM
You might try being a bit less emphatic, because I am telling you that you are doing something wrong. I think what you mean is "I can't make it work" or "It's not working for me". This code works fine and both conditions are met.
<cfquery name="qryGetCatalog" datasource="wegotwidgets">
order by productName
<cfif isDefined( 'qryGetCatalog' )>
<cfif structKeyExists( variables, 'qryGetCatalog' )>
the struct key exists
I recommend using structKeyExists() instead of isDefined() because it is more specific (it's forcing a lookup in only the variables scope, while isDefined() will automatically look for the variable in any of the auto-lookup scopes beyond the variables scope).
Last edited by kiteless : March 3rd, 2005 at 09:54 AM.