Attribute validation error for tag CFQUERYPARAM.

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

  1. #1

    Default Attribute validation error for tag CFQUERYPARAM.

    I have a page that lets the user upload an image to change the logo of the
    website. It works fine on ColdFusion MX7 but on earlier versions I get the
    following error;


    Attribute validation error for tag CFQUERYPARAM.
    The value of the attribute VALUE is invalid. The value cannot be converted to
    a string because it is not a simple value.Simple values are booleans, numbers,
    strings, and date-time values.

    The Error Occurred in E:\Websites\Caracas\adm\upload_action.cfm: line 17

    15 : <cfquery name="insImg" datasource="#Application.dsname#">
    16 : UPDATE siteconfiguration
    17 : SET logo = <cfqueryparam value="#MyBinary#" cfsqltype="cf_sql_blob">
    18 : WHERE (coname = '#Application.coname#')
    19 :


    Here is the code that I'm using:
    <cffile action="readbinary" file="#form.upload#" variable="logo"
    accept="image/*">

    <cfquery name="insImg" datasource="#Application.dsname#">
    UPDATE siteconfiguration
    SET logo = <cfqueryparam value="#logo#" cfsqltype="cf_sql_blob">
    WHERE (coname = '#Application.coname#')
    </cfquery>

    Any ideas?

    sacu300 Guest

  2. Similar Questions and Discussions

    1. Error With CFQUERYPARAM
      Here is an error that only exists when cfqueryparam is used. The code below throws an error in the *second* query if the *first* query contains...
    2. Attribute validation error for tag cfloop
      I am trying to dynamically generate a "photo album" output into a table with corresponding captions: The out put should be 1 2 1.c 2.c...
    3. CFQUERYPARAM Error
      Hello, I am using MX7 and am having problems with cfqueryparam. I am new to a project and the old code does not use them and everything I have...
    4. attribute validation error for tag cfchartdata
      Hello world! I'm trying to use a variable in my chart, but I'm getting the error: "Attribute validation error for tag cfchartdata. The value of...
    5. cfmail - Attribute validation error for tag CFMAIL.
      I'm getting the error ' Attribute validation error for tag CFMAIL.' on the code below. All its doing is outputting a text string to the TO: field. ...
  3. #2

    Default Re: Attribute validation error for tag CFQUERYPARAM.

    I'm not sure when cf_sql_blob was added, but it is not a valid cfsqltype in version 5.
    jdeline Guest

  4. #3

    Default Re: Attribute validation error for tag CFQUERYPARAM.

    Is your data really binary?
    C-Ramey 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