troubles with query of queries

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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......
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default 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

  4. #3

    Default 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

  5. #4

    Default 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

  6. #5

    Default Re: troubles with query of queries

    > This line
    > <cfset qqq = QueryNew("city", "VarChar")>
    > should read
    > <cfset qqq = QueryNew("city,VarChar")>
    > QueryNew expects a list of field names.
    If they're using CF7 (which I assume they are), then their code is correct.
    --

    Adam
    Adam Cameron Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139