CFQUERY not working for some reason

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

  1. #1

    Default CFQUERY not working for some reason

    I have the following code to authenticate a password, and it is successful,
    complete the <CFIF> Statement:

    <cfquery name="checkpass" datasource="#request.ds#">
    SELECT Count(tbl_Passwords.password) AS CPASS
    FROM tbl_Passwords
    WHERE tbl_Passwords.password='#FORM.password#';
    </cfquery>

    <cfif checkpass.CPASS GT 0>
    Do something here........

    However, it shoots right to the <CFELSE> part which says password cannot be
    authenticated. The password exists and is in the database, so I'm confused as
    to why this no longer works. Especially since I have not changed this code in
    quite some time and it was working fine. Please help

    bfinelsen Guest

  2. Similar Questions and Discussions

    1. Reason why Player not working
      The reason that many websites are asking you to upgrade Shockwave Player is because of the method that is being used to determine which ActiveX...
    2. No components working for no reason!
      Oh my god! For some reason every single page that relies on a component, doesn't work! This is horrible! I always get this. The system has...
    3. PreserveSingleQuotes Not Working in CFQUERY
      Just a heads up to those for those using CFSCRIPT within a CFQUERY to compose a Dynamic SQL statement. When you try to use...
    4. cfquery for date not working
      Greetings - I am sure what I am missing is something simple. I am trying to query for a specific date in a database. However, when I search for a...
    5. Any reason why....
      That's just the way they created the application. Some (but not all) effects that aren't available to the full CMYK image CAN be used if you apply...
  3. #2

    Default Re: CFQUERY not working for some reason

    If you haven't already, turn on CF debugging and see what query you are
    actually sending to the SQL server. If you're problem isn't obvious at first
    glance, paste the resulting sql code into query analyzer and run it there to
    see what happens. You may also consider removing the count() aggr function
    from the sql and letting it return rows - then <cfdump var="#checkpass"#> right
    after you </cfquery> to see what actually got returned to coldfusion.

    JaredJBlackburn 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