Wil Genovese wrote:
> This sort of makes sense.  The DB rejected the request, somewhere in the 
> process the JDBC driver returned "nothing" or NULL or something not exactly 
> expected and closed the request. CF not getting a result set (not even an 
> empty results set) didn't set the query result set variable.  Thus you get an 
> error trying to reference the query.
>
> I've seen similar issues like this in the past where the JDBC didn't give CF 
> a response or maybe it was a null response and closed the request. CF 
> continues as if nothing happened and the query variable is never set.
>   

Specifically, it happens when underlying (Java) code sets something to
null. CF doesn't grok that and reports that the variable *containing*
the null isn't defined (which is, I suppose, actually correct for some
values of correct). You can get the same problem with, for example,
trying to access missing values in sparse arrays.

<cfparam> is your friend, with its default set to something appropriate
(I have a Java object I treat as an ersatz null).

-- 
Regards,

Pete (jQuery-free) Jordan
Horus Web Engineering Ltd
http://www.webhorus.net/
phone: +44 1482 446471
mobile: +44 7973 725120


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344704
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to