Surprising Error with QofQ in CF 5

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Surprising Error with QofQ in CF 5

    Has anyone seen this error? I don't understand why I can get the below QofQ
    code to work properly on my personal developer CF MX server but I can't make it
    work on my Department's enterprise CF 5 server? To me, it seems like the CF 5
    server doesn't understand how to process a QofQ. Any thoughts? Thanks.

    Here is the error:

    Query Manipulation Error Code = 0
    Invalid SQL
    SQL = "SELECT test1.* FROM test1;"
    Data Source = ""

    Here is the code:

    <cfquery NAME="test1" datasource="#REQUEST.DSN#">
    SELECT CNY_COUNTY.*
    FROM CNY_COUNTY;
    </cfquery>

    <cfloop QUERY="test1">
    #CNY_NAME#<br />
    </cfloop>

    <cfquery NAME="test2" DBTYPE="QUERY" >
    SELECT test1.*
    FROM test1;
    </cfquery>

    <cfloop QUERY="test2">
    #CNY_NAME#<br />
    </cfloop>

    waterworker Guest

  2. Similar Questions and Discussions

    1. QofQ and SQL 5.0
      I have just had a conversation with my hosting company about one of my apps suddenly throwing up errors when I perform a SQL similar to the...
    2. Enumerable#inject is surprising me...
      Does it surprise you? irb(main):001:0> .inject{break 'b'} => "a" I expected "b" as the result. Is this intendend behavior? If so, what is the...
    3. Enumerable#inject is surprising me...<Pine.LNX.4.44.0310090713420.21222-100000@ool-4355dfae.dyn.optonline.net>
      Hi -- On Thu, 9 Oct 2003, ts wrote: I thought "break val" executed a break *and* generated a return value for the block at the same time: ...
    4. Enumerable#inject is surprising me...<Pine.LNX.4.44.0310062142170.7305-100000@ool-4355dfae.dyn.optonline.net>
      Hi -- On Tue, 7 Oct 2003 nobu.nokada@softhome.net wrote: I'm not sure why it would be "". Wouldn't that only happen if the empty string...
    5. Class variables - a surprising result
      On Thu, Aug 21, 2003 at 06:33:09PM +0900, Jason Williams wrote: Class variable allocation is per class scope, not per subclass scope. Sub1, Sub2...
  3. #2

    Default Re: Surprising Error with QofQ in CF 5

    Q-of-Q first became available with CF 5, and it doesn't look like you are doing
    anything that wasn't supported in that version, except that you should get rid
    of the trailing semicolon at the end of your query (;).

    Phil

    paross1 Guest

  4. #3

    Default Re: Surprising Error with QofQ in CF 5

    Thanks for the quick response. I tried removing the semicolon and got the same error. Any other thoughts?
    waterworker Guest

  5. #4

    Default Re: Surprising Error with QofQ in CF 5

    Here is the CF 5 LiveDocs page for
    [url]http://livedocs.macromedia.com/coldfusion/5.0/Developing_ColdFusion_Applications[/url]
    /queryDB11.htm#1117238

    Try removing the table name prefix from your select, or select explicit
    column names from your first query rather than SELECT * ?

    <cfquery NAME="test2" DBTYPE="QUERY" >
    SELECT *
    FROM test1
    </cfquery>

    Phil


    paross1 Guest

  6. #5

    Default Re: Surprising Error with QofQ in CF 5

    Thanks for the help.
    waterworker 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