cfqueryparam messin up query

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

  1. #1

    Default cfqueryparam messin up query

    I have an access database that contain a linked table which is an view within
    Oracle the connection works fine. when I query the View/table and use a char
    datatype against a char filed and use cfqueryparam i get no rows back.

    If I take out the cfqueryparam it works fine. I have confirmed that I have the
    correct datatypes:

    THIS WORKS:
    SELECT
    [LAWSON_SHC_EMPLOYEE_V].[LAST_NAME]
    FROM
    LAWSON_SHC_EMPLOYEE_V
    WHERE
    LAWSON_SHC_EMPLOYEE_V.LAST_NAME= '#form.Lname#'
    THIS DOESN'T WORK:

    SELECT
    [LAWSON_SHC_EMPLOYEE_V].[LAST_NAME]
    FROM
    LAWSON_SHC_EMPLOYEE_V
    WHERE
    LAWSON_SHC_EMPLOYEE_V.LAST_NAME= <cfqueryparam value="#ucase(form.Lname)#"
    cfsqltype="cf_sql_char">

    we have policy of using cfqueryparam here at work and I need to explain to my
    boss why this doesnt work it and it is started to get uncomfortable. any help
    would be appreciated

    Thank You

    Ron

    albatross07 Guest

  2. Similar Questions and Discussions

    1. cfqueryparam and mysql
      I have a question, is cfqueryparam's cfsqltype attribute database dependent? For example, in the LiveDocs, there is no mention of mysql's mediumint...
    2. cfqueryparam usage
      Hello, Ive been tightening up my querys using the cfqueryparam tag and it does also seem to help greatly with speed. Is it worth using...
    3. cfqueryparam
      Hi, I am trying to take values passed through a form and do a search based on that, but I am getting an error Error Executing Database Query....
    4. sql in operator with cfqueryPARAM
      here is my query select distinct option_type, description, id from option_types where id NOT IN(<cfqueryPARAM value = "#mikeslist#" CFSQLType =...
    5. cfqueryPARAM problem
      Viva Coldfusion Forum - 'Kudos to all who help out in the time of trouble for they shall be rescued in theirs' I am concatenating an sql statement...
  3. #2

    Default Re: cfqueryparam messin up query

    > LAWSON_SHC_EMPLOYEE_V.LAST_NAME= '#form.Lname#'
    > LAWSON_SHC_EMPLOYEE_V.LAST_NAME= <cfqueryparam value="#ucase(form.Lname)#"
    > cfsqltype="cf_sql_char">
    You're not filtering on the same criterion. Could that have something to
    do with it?

    --

    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