Skip to main content
Participant
Mar 2, 2011 3:48 PM UTC
Question

getResult() returns 'undefined'

It seems that not long ago when one would perform a databse query in cfscript (using Cold Fusion 9) via the following method:

theQuery = new Query(datasource=APPLICATION.dsn,sql="

     SELECT * FROM some_table

").execute().getResult();

That if there were no records returned from the query that what got returned was an empty query object.

NOW, it appears that what is returned is 'undefined', which is breaking my code. 

Does anybody know why this is happening?

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Inspiring
Mar 2, 2011 5:05 PM UTC

When I do this:

theQuery = new Query(datasource="dw",sql="SELECT * FROM event where 1 = 2").execute().getResult();


</cfscript>
<cfdump var="#thequery#" metainfo=no>

I get an empty query object.

What is the line of code that is generating the error?

Translate