Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
the_last #1
troubles with query of queries
Executing this simple code: <cfset qqq = QueryNew('city', 'VarChar')> <cfset
newRow = QueryAddRow(qqq, 2)> <cfset temp = QuerySetCell(qqq, 'city', 'Rome',
1)> <cfset temp = QuerySetCell(qqq, 'city', 'Paris', 1)> <CFQUERY name='qr'
dbtype='query'> SELECT * FROM qqq </CFQUERY> <cfdump var='#qr#'> I get the
following error page: Error Executing Database Query. The error
occurred in D:\testing2_wc\testing_le\prove\qoq.cfm: line 5 3 : <cfset temp =
QuerySetCell(qqq, 'city', 'Rome', 1)> 4 : <cfset temp = QuerySetCell(qqq,
'city', 'Paris', 1)> 5 :<B> <CFQUERY name='qr' dbtype='query'></B> 6 : SELECT
* FROM qqq 7 : </CFQUERY>
--------------------------------------------------------------------------------
SQL SELECT * FROM qqq Please try the following: Check the ColdFusion
documentation to verify that you are using the correct syntax. Search the
Knowledge Base to find a solution to your problem. Browser Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Remote Address
192.168.3.55 Referrer Date/Time 18-mar-05 12:43 PM Stack Trace
(click to expand) at
cfqoq2ecfm1003981279.runPage(D:\testing2_wc\testin g_le\prove\qoq.cfm:5) at
cfqoq2ecfm1003981279.runPage(D:\testing2_wc\testin g_le\prove\qoq.cfm:5)
java.sql.SQLException at
coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.jav a:76) at
coldfusion.sql.JdbcImpl.getConnection(JdbcImpl.jav a:59) at
coldfusion.sql.SqlImpl.execute(SqlImpl.java:214) at
coldfusion.tagext.sql.QueryTag.doEndTag(QueryTag.j ava:498) at
cfqoq2ecfm1003981279.runPage(D:\testing2_wc\testin g_le\prove\qoq.cfm:5) at
coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152) at
coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343) at
coldfusion.filter.CfincludeFilter.invoke(Cfinclude Filter.java:65) at
coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:210) at
coldfusion.filter.PathFilter.invoke(PathFilter.jav a:86) at
coldfusion.filter.LicenseFilter.invoke(LicenseFilt er.java:27) at
coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50) at
coldfusion.filter.BrowserDebugFilter.invoke(Browse rDebugFilter.java:52) at
coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
er.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38)
at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38) at
coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22) at
coldfusion.CfmServlet.service(CfmServlet.java:105) at
coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257) at
jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:527) at
jrun.servlet.http.WebService.invokeRunnable(WebSer vice.java:172) at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invok eRunnable(ThreadPool.java:349)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:457)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeR unnable(ThreadPool.java:295)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66) if I delete the
path to postgresql-8.0-310.jdbc3.jar (the postgresql jdbc driver) from the
coldfusion class path, the above error disappears. Help me please.
the_last Guest
-
Need Help with Query of Queries
I have the query "almost" there but I'm not sure exactly how to accomplish this. I need all recrods meeting the criteria from the AppliedLicense... -
Query of Queries
I think that we're using 5 on both environments (not checked that though - they shouldn't be different anyway)... It seems that i've fixed it...... -
query of queries with avg()
cfmx 6.1 when i use avg() in a query of queries it rounds the results (actually rounds results down)...so i'm wondering if i am doing this... -
2 queries to 1 query
Hello, Can somebody help me to combine these two queries into one query. <cfquery datasource="#DATAS#" name="getMainNav"> SELECT * FROM... -
Query of Queries on query New type query
In CF5 we have a page that creates a query, using queryNew and querySetCell and the like, we then used dbtype="query" and gave it's name so we could... -
Adam Cameron #2
Re: troubles with query of queries
I suspect it's because you're adding two rows but only populating the first
one (twice). CF doesn't like NULLs.
Stick "Paris" in the second row (which is, I imagine, what you are meaning
to do anyhow), and try again.
--
Adam
Adam Cameron Guest
-
the_last #3
Re: troubles with query of queries
I corrected the error but I obtain the same result The code was only an
example. i get an error for every query of queries in my application. :( the
error happens only if coldfusion loads the postgresql jdbc driver class
the_last Guest
-
CFGumby #4
Re: troubles with query of queries
I have questions about this code;
This line
<cfset qqq = QueryNew("city", "VarChar")>
should read
<cfset qqq = QueryNew("city,VarChar")>
QueryNew expects a list of field names.
I copied your code and got an error on that line (lne 1) before I got to the
query (line 5).
Hope this helps.
CFGumby Guest
-
Adam Cameron #5
Re: troubles with query of queries
> This line
If they're using CF7 (which I assume they are), then their code is correct.> <cfset qqq = QueryNew("city", "VarChar")>
> should read
> <cfset qqq = QueryNew("city,VarChar")>
> QueryNew expects a list of field names.
--
Adam
Adam Cameron Guest



Reply With Quote

