Ask a Question related to Coldfusion Database Access, Design and Development.
-
tomaszz #1
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
-
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... -
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,... -
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... -
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... -
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. ... -
tomaszz #2
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
-
tomaszz #3
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



Reply With Quote

