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

  1. #1

    Default 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 following:

    <cfquery name="cmacsRS_contactLeadDetails" dbtype="query">
    SELECT contact_id FROM cmacsRS_allContactLeads
    WHERE contact_company LIKE '%#variables.distinctCompanyName#%'
    </cfquery>

    If I do this as a normal query it works fine, but it now falls over even
    though the page has been up and runniing for over a year. Has anyone else
    experienced this? Is there a work round in the Admin or SQL 5.0 itself?

    My datasets are quite large so I was using this method to speed things up.

    Cheers!


    Tyran Guest

  2. Similar Questions and Discussions

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

    Default Re: QofQ and SQL 5.0

    What the error message?
    By the way inquery of query this string you are filtering for is case sencitive.
    CF_Oracle Guest

  4. #3

    Default Re: QofQ and SQL 5.0

    I didn't realise about the case sensitivity, cheers.

    It's coming back with a null pointer error which is very strange! Convert the same SQL to standard and it works fine.
    Tyran Guest

  5. #4

    Default Re: QofQ and SQL 5.0

    What's the value of your variable?

    If you hard code that value into your Q of Q, does it still crash?
    Dan Bracuk Guest

  6. #5

    Default Re: QofQ and SQL 5.0

    That was my first thought that the session was somehow the cause, but I substituted 'A%' and it still came back with the same error.
    Tyran Guest

  7. #6

    Default Re: QofQ and SQL 5.0

    > That was my first thought that the session was somehow the cause, but I substituted 'A%' and it still came back with the same error.

    I suspect you have some null data in cmacsRS_allContactLeads (and back when
    the QoQ worked, you did NOT have null data in it).

    QoQ gets very confused very quickly when there are nulls in the query it's
    querying; they don't even have to be in columns you're referencing in the
    SQL, but I'd check contact_company and contact_id first.

    --
    Adam
    Adam Cameron Guest

  8. #7

    Default Re: QofQ and SQL 5.0

    I've checked those fields already but haven't come acroos that QofQ can fal over if there is ANY null in the database. Thanks, I'll investigate that one and get back to everyone.

    :beer;
    Tyran Guest

  9. #8

    Default Re: QofQ and SQL 5.0

    > QofQ can fal over if there is ANY null in the database.

    Just to clarify, not in the *database*, in the query you're performing the
    QoQ on (ie: only the data CF can see in the <cfquery dbtype="query">
    statement).

    --
    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