Invalid Bracketing Error

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

  1. #1

    Default Invalid Bracketing Error

    Need some help with an MS Access error.

    I'm getting the following error mesage in MS Access on my hosting server, but
    the CF code is executing fine on my machine works on my machine. Not sure what
    th error refers to.

    Macromedia] Invalid bracketing of name ''.

    The error occurred in D:\home\hnt26a062\admin\edit_images.cfm: line 58

    56 : tblPhotos.photoName = "#file1#",
    57 : tblPhotos.thumbNailName = "#file2#"
    58 : <h>WHERE tblPhotos.photoID = #form.photoID#</h>
    59 : </cfquery>
    60 : <cfset uploaded = "yes">




    --------------------------------------------------------------------------------

    SQL Update tblPhotos SET tblPhotos.photoName =
    "Anna_Nicole_obsessed_with_Marilyn_Monroe.jpg" , tblPhotos.thumbNailName =
    "thumb_Anna_Nicole_obsessed_with_Marilyn_Monroe.jp g" WHERE tblPhotos.photoID =
    378
    DATASOURCE top10HT
    VENDORERRORCODE -1002
    SQLSTATE 42000


    The code around the offending SQL statement is:

    <cfif isDefined("form.update")>

    <!---DELETE IMAGES FROM SERVER DIR (tested and working)--->

    <cfset myDir = GetDirectoryFromPath(CGI.Path_Translated) & "uploaded_images\"
    & "#session.companyID#" & "\">
    <cfset thumb = "thumb_" & "#form.photoName#">

    <!---delete large image from the uploaded_images dir--->
    <cffile action="delete"
    file="#myDir##form.photoName#">

    <!---delete small image from the uploaded_images dir--->
    <cffile action="delete"
    file="#myDir##thumb#">


    <!---COPY FULL-SIZED IMAGE (tested and working)--->

    <cffile action="upload"
    filefield="img#form.imgNum#"
    destination="#myDir#"
    accept="image/jpeg, image/pjpeg, image/pjpg, image/gif"
    nameconflict="makeunique">



    <cfset file1 = #file.serverfile#>
    <cfset file1_resized = #file.serverfile#>


    <!-- RESIZE ORIGINAL IMAGE to a height of 450px. Width will be proportional
    (tested and working)--->
    <CFX_Image ACTION="RESIZE" FILE="#myDir##file1#"
    OUTPUT="#myDir##file1_resized#" QUALITY="100" Y="450">


    <!---MAKE THUMBNAIL (tested and working)--->

    <cfset file2 = "thumb_" & #file.serverfile#>
    <!-- Resize to a height of 75px. Width will be proportional-->
    <CFX_Image ACTION="RESIZE" FILE="#myDir##file1#"
    OUTPUT="#myDir##file2#" QUALITY="100" Y="75">


    <!---UPDATE THE PHOTO NAMES in the DB.--->

    <cfquery datasource="top10HT">
    Update tblPhotos
    SET
    tblPhotos.photoName = "#file1#",
    tblPhotos.thumbNailName = "#file2#"
    WHERE tblPhotos.photoID = #form.photoID#
    </cfquery>
    <cfset uploaded = "yes">
    <cfset uploadSuccessMSG = 1>
    </cfif>


    <!---get images from db and put them in a table--->

    <cfquery name="getPhotos" datasource="top10HT">
    SELECT tblPhotos.photoID, tblPhotos.thumbNailName, tblPhotos.photoName
    FROM tblPhotos
    WHERE tblPhotos.companyID = #session.companyID#
    </cfquery>
    <cfif getPhotos.RecordCount EQ 0>
    <cfset notUploaded = 1>
    </cfif>



    tomaszz Guest

  2. Similar Questions and Discussions

    1. Session is invalid error for CF 7
      Hello, I am searching for a solution for ColdFusion MX 7. I am getting the "Session is invalid" error ocassionaly. I know there is an article...
    2. datagridviewcomboboxcell is invalid error...
      hi, I have installed VS.NET 2005... I have a datagridview on a form and one of the columns is a comboboxcolumn. I set up the datasource,...
    3. Invalid CurrentPageIndex error
      Hi all, Invalid CurrentPageIndex error seems to occur even when CurrentPageIndex is set to zero just before binding the datagrid. Can anyone...
    4. Invalid partition error...please help
      Error Type: (0x8004020F) The event class for this subscription is in an invalid partition /forms/mailForm.asp, line 90 what does this error...
    5. bracketing question
      I just inherited a Nikon FA (lucky me, it's in pristine shape--maybe 10 rolls of film through it). I have a question about the bracketing feature. ...
  3. #2

    Default Re: Invalid Bracketing Error

    Thanks for your help. I'll check to see if this works. But...one question: if
    the double quotes are working on my db on my box, why won't they work on the
    same db on the web host. Just curious.

    P.S. I will definitely help if I can.

    Tomaszz.

    tomaszz Guest

  4. #3

    Default Re: Invalid Bracketing Error

    Thanks. That works fine. But I'm having another issue with CFFILE. Works fine
    on my machine locally but get the following error on the host. Thanks in
    advance. It's a little frustrating having something working locally then
    breaking on the host.

    Attribute validation error for tag CFFILE.
    The value of the attribute destination, which is currently
    "D:\home\hnt26a062\admin\uploaded_images\53\", is invalid.

    The error occurred in D:\home\hnt26a062\admin\upload_images.cfm: line 31

    29 : destination='#destination#'
    30 : accept='image/jpeg, image/pjpeg, image/pjpg, image/gif'
    31 : nameconflict="makeunique">
    32 :
    33 : <cfset file1 = #file.serverfile#>

    If I create the directory then the upload part of CFFILE works fine, so it
    seems that CFFILE is not creating the directory. The directory name is being
    created using userID. The offending code is as follows.

    <cfset destination = GetDirectoryFromPath(CGI.Path_Translated) &
    "uploaded_images\" & "#session.companyID#" & "\">
    <cffile action='upload'
    filefield='img#i#'
    destination='#destination#'
    accept='image/jpeg, image/pjpeg, image/pjpg, image/gif'
    nameconflict="makeunique">

    <cfset file1 = #file.serverfile#>
    <cfset file1_resized = #file.serverfile#>

    <!-- Resize original image to a height of 450px. Width will be
    proportional-->
    <CFX_Image ACTION="RESIZE" FILE="#destination##file1#"
    OUTPUT="#destination##file1_resized#" QUALITY="100" Y="450">

    <!---resize to thumbnail--->

    <cfset file2 = "thumb_" & #file.serverfile#>
    <!-- Resize to a height of 75px. Width will be proportional-->
    <CFX_Image ACTION="RESIZE" FILE="#destination##file1#"
    OUTPUT="#destination##file2#" QUALITY="100" Y="75">

    <cfquery name="insertIMGName" datasource="top10HT">
    INSERT INTO tblPhotos
    (
    companyID,
    photoName,
    thumbNailName
    )
    VALUES
    (
    '#session.companyID#',
    '#file.ServerFile#',
    '#file2#'
    )
    </cfquery>
    <cfset i = i + 1>
    </cfloop>

    tomaszz 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