Looking out on the internet, I came across an interesting article that 
might point to the issue - take a look at the surrounding threads on here 
for further info - not sure this will be the solution - just an 
idea....sounds the very same as what you're seeing.

Thanks,

Craig Nassal

Federal Reserve Bank of Atlanta
1000 Peachtree St. N.E.
Atlanta, Ga 30309-4470
(404)498-8437
craig.nas...@atl.frb.org



Dusty Hale <du...@climbonline.com> 
Sent by: ad...@acfug.org
01/27/10 02:25 PM
Please respond to
discussion@acfug.org


To
discussion@acfug.org
cc

Subject
[ACFUG Discuss] a very strange sql error that only happens when using CF






Hi:

I've run into a very strange issue. I have a cfc which has a <cfquery> tag 
in it. I recently added one field the SQL in the query and am getting an 
error I've never seen before. I can't seem to dig out any info to solve 
this. If anyone is familiar, please share.

Of course when I output the SQL and run in a SQL Studio Query window, the 
query runs fine with no errors. 

Here the error I see in CF:


-----------------------------------------------------------------------------------------------------------------------------

[Macromedia][SQLServer JDBC Driver][SQLServer]Divide by zero error 
encountered. 

The error occurred in 
D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc: line 149
Called from D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc: line 
139
Called from D:\websites\xytexcom_stage2\htdocs\search.cfm: line 48
Called from D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc: line 
149
Called from D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc: line 
139
Called from D:\websites\xytexcom_stage2\htdocs\search.cfm: line 48

147 :                            </cfscript>
148 :                            <cfquery name="q" 
datasource="#application.dsn_name#" username="#application.db_user#" 
password="#application.db_pword#">
149 :                            #qText#

150 :                            </cfquery>
-----------------------------------------

Here's the SQL code in the qText variable. Please note that it runs fun in 
Query Analyzer. Also note that no division is being used.

----------------------------------------------------------------
Select donorid, occupation, race, haircolor, hairtexture, eyecolor, 
religion, bloodtype, height, weight, heightmetric, weightmetric, 
reportedpregnancy, opendonorid, infomp3avail, ethnicity, cmvstatus, 
DateEntered, ARTavail, ARTonly, SelectDonors FROM v_websearch where 
available = 1 AND donorid like '%9986%' ORDER BY donorid
----------------------------------------------------------------------------------

Any advise or thought on this of course is greatly appreciated.

Dusty




-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to