HI Guys,

That post was from 2010!

From: cfaussie@googlegroups.com [mailto:cfaussie@googlegroups.com] On Behalf Of 
Mike K
Sent: Friday, 4 November 2016 8:21 AM
To: cfaussie
Subject: Re: [cfaussie] Re: Strange problem - Element RECORDCOUNT is undefined 
in query

Have you run the query in your database to be certain it actually should return 
some rows?       And that there's no syntax errors or anything like that in the 
query itself?      It's possible that your CFQuery is correctly returning no 
rows.

Cheers,
Mike Kear
Windsor, NSW, Australia
AFP Webworks.

On Fri, Nov 4, 2016 at 1:16 AM, Hanswurst Globobrüll 
<rm.onlineumfra...@gmail.com<mailto:rm.onlineumfra...@gmail.com>> wrote:
I had exactly the same problem in CF8, CF9 und also CF11.
Out team was analyzing and examining for days (!) - because the problem was not 
repleatable on purpose. It just occured sometimes and we found evidence in log 
files.
and finally we found out that the problem is the database. we use mysql, and 
when mysql (under huge load) creates deadlocks and a single request just times 
out, the <cfquery variable has no content, ergo recordcount does not exist 
because the query result could not be created.
observe your database as a first step!
best regards
raffael

Onlineumfragen.com

Am Freitag, 1. Oktober 2010 01:35:44 UTC+2 schrieb Scott.thornton:
Hi,

Running across a odd problem in CF 9,0,0,251028. development server.

I was just running a process that usually works and has not been modified for 
quite a long time. part of that process runs a query and then loops over the 
result set. Simple enough… however the query does not seem to exist after it 
has run.

eg: The following code returns Element RECORDCOUNT is undefined in FIX_THIS.


<cfquery  datasource="#DSN#" name="fix_this">
                select sb_invoice.sb_invoice_id, sb_invoice.sb_reminder_date, 
max(sb_claim_date) as sb_claim_date
                from sb_invoice
                inner join sb_invoice_item
                on sb_invoice.sb_invoice_id = sb_invoice_item.sb_invoice_id
                inner join sb_item_claim
                on sb_invoice_item.sb_invoice_item_id = 
sb_item_claim.sb_invoice_item_id
                where sb_invoice.sb_bill_mech_code in 
('M','F','AG','SC','MB','MO')
                and sb_invoice_item.sb_item_status_code in ('21','24','31')
                group by sb_invoice.sb_invoice_id, sb_invoice.sb_reminder_date
                having sb_invoice.sb_reminder_date < 
DateAdd(d,30,max(sb_claim_date))
</cfquery>

<cfif fix_this.recordcount gt 0>

                <cfoutput query="fix_this">

                                <cfquery name="upd_fund_reminder" 
datasource="#DSN#">
                                                update sb_invoice
                                                set sb_reminder_date = 
<cfqueryparam cfsqltype="cf_sql_varchar" 
value="#DateFormat(DateAdd("d",31,fix_this.sb_claim_date),"dd-mmm-yyyy")#">
                                                where sb_invoice_id = 
<cfqueryparam cfsqltype="cf_sql_numeric" value="#fix_this.sb_invoice_id#">
                                </cfquery>

                </cfoutput>

</cfif>

I have changed the name of the query to a few different values, I have used 
cfloop instead of cfoutput, I added the cfif.recordcount to see if that helped, 
to no avail. Without the CFIF the error was :
Attribute validation error for tag cfoutput.



The value of the attribute query, which is currently fix_this, is invalid.



Debug output shows that the query executed in 922ms and returned no rows.

What am I missing?

--
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
cfaussie+unsubscr...@googlegroups.com<mailto:cfaussie+unsubscr...@googlegroups.com>.
To post to this group, send email to 
cfaussie@googlegroups.com<mailto:cfaussie@googlegroups.com>.
Visit this group at https://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.



--
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion 9 Enterprise, PHP, ASP, ASP.NET<http://ASP.NET> hosting from 
AUD$15/month
--
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
cfaussie+unsubscr...@googlegroups.com<mailto:cfaussie+unsubscr...@googlegroups.com>.
To post to this group, send email to 
cfaussie@googlegroups.com<mailto:cfaussie@googlegroups.com>.
Visit this group at https://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.
Unless explicitly attributed, the opinions expressed in this email are those of 
the author only and do not represent the official view of Hunter New England 
Local Health District nor the New South Wales Government.

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cfaussie+unsubscr...@googlegroups.com.
To post to this group, send email to cfaussie@googlegroups.com.
Visit this group at https://groups.google.com/group/cfaussie.
For more options, visit https://groups.google.com/d/optout.

Reply via email to