Title:
Bug 81646:Any time I try to use preserveSingleQuotes() inside a CFQUERYPARAM with list="yes", the query doesn't return any values at all and throws an error saying that the query name doesn't exist
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Joseph DeVore / Joseph DeVore (Joseph DeVore)
Created: 01/15/2010
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Normal / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
Any time I try to use preserveSingleQuotes() inside a CFQUERYPARAM with list="yes", the query doesn't return any values at all and throws an error saying that the query name doesn't exist.This code errors every time:(<cfqueryparam cfsqltype="cf_sql_varchar" value="#preserveSingleQuotes(arguments.AwardNumber)#" list="yes"/>)The same thing happens when I try to pass the qualified list of values into a CFC and then use preserveSingleQuotes() so that the query keeps the qualified list.If I take the generated SQL that's displayed in the debug output and paste it into a normal CFQUERY without preserveSingleQuotes(), it works fine.
Method:
Steps to reproduce: Create a list of strings, qualify it with single quotes using listQualify(), then pass that variable into your cfqueryparam and try to use preserveSingleQuotes().Like this: where AwardNumber in (<cfqueryparam cfsqltype="cf_sql_varchar" value="#preserveSingleQuotes(arguments.AwardNumber)#" list="yes"/>)CFDUMP your query and you'll get an error. It says that the variable (the name of the query) doesn't exist and throws an exception.
Result:
Stack Traceat cftest_qp2ecfm1038329465$funcGETUWPRIMEGRANTCURRENTQUARTER.runFunction(D:\www\arra\test_qp.cfm:36) at cftest_qp2ecfm1038329465.runPage(D:\www\arra\test_qp.cfm:2)coldfusion.runtime.UndefinedVariableException: Variable QGETDATA is undefined.at coldfusion.runtime.CfJspPage._get(CfJspPage.java:377)at coldfusion.runtime.CfJspPage._get(CfJspPage.java:339)at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:1447)at cftest_qp2ecfm1038329465$funcGETUWPRIMEGRANTCURRENTQUARTER.runFunction(D:\www\arra\test_qp.cfm:36)at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)at cftest_qp2ecfm1038329465.runPage(D:\www\arra\test_qp.cfm:2)at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:342)at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)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.CachingFilter.invoke(CachingFilter.java:53)at coldfusion.CfmServlet.service(CfmServlet.java:200)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:286)at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040783
External Customer Info:
External Company:
External Customer Name: Joseph DeVore
External Customer Email: 2CEE6D2A45CD32529920157F
External Test Config: 01/15/2010
Attachments:
Comments: