Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

getResult() returns 'undefined'

New Here ,
Mar 02, 2011 Mar 02, 2011

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?

TOPICS
Database access
650
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 02, 2011 Mar 02, 2011
LATEST

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
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources