I agree with you because in the last part of the CF error message notice the
SQL state the quotes are doubled up. However, when I output the string there
not doubled up. I'm testing it out now.

Never seen anything like this in all my years LOL ...



 The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.

  The following information is meant for the website developer for debugging
purposes.    Error Occurred While Processing Request      Error Executing
Database Query.    [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>
151 :           

  ------------------------------
   SQLSTATE   22012  SQL    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
VENDORERRORCODE   8134  DATASOURCE   xytexcom_sql2005    Resources:

   - Check the ColdFusion
documentation<http://www.macromedia.com/go/proddoc_getdoc>to verify
that you are using the correct syntax.
   - Search the Knowledge
Base<http://www.macromedia.com/support/coldfusion/>to find a solution
to your problem.

     Browser   Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7)
Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.5.30729)  Remote Address
65.13.120.212  Referrer   http://stage2.xytex.com/search_adv.cfm
Date/Time   27-Jan-10 02:01 PM     Stack Trace   at
cfdonorsearch2ecfc665956255$funcDONORSEARCH._factor8(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:149)
at
cfdonorsearch2ecfc665956255$funcDONORSEARCH.runFunction(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:139)
at
cfsearch2ecfm984473465.runPage(D:\websites\xytexcom_stage2\htdocs\search.cfm:48)
at
cfdonorsearch2ecfc665956255$funcDONORSEARCH._factor8(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:149)
at
cfdonorsearch2ecfc665956255$funcDONORSEARCH.runFunction(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:139)
at
cfsearch2ecfm984473465.runPage(D:\websites\xytexcom_stage2\htdocs\search.cfm:48)


java.sql.SQLException: [Macromedia][SQLServer JDBC
Driver][SQLServer]Divide by zero error encountered.
        at macromedia.jdbc.base.BaseExceptions.createException(Unknown Source)
        at macromedia.jdbc.base.BaseExceptions.getException(Unknown Source)
        at macromedia.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown 
Source)
        at macromedia.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown 
Source)
        at macromedia.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
        at 
macromedia.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown
Source)
        at macromedia.jdbc.base.BaseStatement.commonTransitionToState(Unknown 
Source)
        at macromedia.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
        at macromedia.jdbc.base.BaseStatement.commonExecute(Unknown Source)
        at macromedia.jdbc.base.BaseStatement.executeInternal(Unknown Source)
        at macromedia.jdbc.base.BaseStatement.execute(Unknown Source)
        at 
coldfusion.server.j2ee.sql.JRunStatement.execute(JRunStatement.java:348)
        at coldfusion.sql.Executive.executeQuery(Executive.java:1210)
        at coldfusion.sql.Executive.executeQuery(Executive.java:1008)
        at coldfusion.sql.Executive.executeQuery(Executive.java:939)
        at coldfusion.sql.SqlImpl.execute(SqlImpl.java:325)
        at coldfusion.tagext.sql.QueryTag.executeQuery(QueryTag.java:831)
        at coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.java:521)
        at 
cfdonorsearch2ecfc665956255$funcDONORSEARCH._factor8(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:149)
        at 
cfdonorsearch2ecfc665956255$funcDONORSEARCH.runFunction(D:\websites\xytexcom_stage2\htdocs\cfc\donorsearch.cfc:139)
        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:418)
        at 
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:360)
        at 
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:324)
        at 
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:56)
        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:277)
        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:463)
        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:453)
        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:320)
        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2210)
        at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:358)
        at 
cfsearch2ecfm984473465.runPage(D:\websites\xytexcom_stage2\htdocs\search.cfm:48)
        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:192)
        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:366)
        at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
        at 
coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
        at 
coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
        at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
        at 
coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
        at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
        at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
        at 
coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
        at coldfusion.CfmServlet.service(CfmServlet.java:175)
        at 
coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
        at 
coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
        at 
coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
        at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
        at jrun.servlet.FilterChain.service(FilterChain.java:101)
        at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
        at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
        at 
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:284)
        at 
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
        at 
jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)
        at 
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
        at 
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
        at 
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
        at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)



On Wed, Jan 27, 2010 at 3:00 PM, Teddy R. Payne <[email protected]>wrote:

> Dusty,
> As a source of troubleshooting, have you put the SQL string into the
> cfquery statement in its final form?  I am wondering if the SQL runs
> correctly in the cfquery before the dynamic evaluation.
>
> <cfquery name="q" datasource="#application.dsn_name#" 
> username="#application.db_user#" password="#application.db_
> pword#">
> **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
> </cfquery>
>
> Does this run correctly?
>
>
>
> Teddy R. Payne, ACCFD
> Google Talk - [email protected]
>
>
>
> On Wed, Jan 27, 2010 at 2:47 PM, Dusty Hale <[email protected]> wrote:
>
>> Teddy here's how I build the qText string part where the quotes are:
>>
>> if(len(txtDonorId)){
>>         qText = qText & "AND donorid like '%" & txtDonorId & "%' ";
>>         }
>>
>>
>>
>> On Wed, Jan 27, 2010 at 2:28 PM, Teddy R. Payne <[email protected]>wrote:
>>
>>> Dusty,
>>> What type of single quotes are those?  What is the source of the text?
>>> Was the query copied and pasted from a Microsoft document?
>>>
>>>
>>> Teddy R. Payne, ACCFD
>>> Google Talk - [email protected]
>>>
>>>
>>>
>>>
>>> On Wed, Jan 27, 2010 at 2:24 PM, Dusty Hale <[email protected]>wrote:
>>>
>>>> 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
>>>>
>>>
>>>
>>
>>
>> --
>> Dusty Hale
>> Email: [email protected]
>> Phone (Atlanta): 404.474.3754
>> Phone (Toll Free USA): 877.841.3370
>> Website: www.DustyHale.com
>>
>
>


-- 
Dusty Hale
Email: [email protected]
Phone (Atlanta): 404.474.3754
Phone (Toll Free USA): 877.841.3370
Website: www.DustyHale.com

Reply via email to