Is there away to remove special characters from a file thats being uploaded.
I can do this to strip out invalid characters, to insert into the database.
#REReplace(form.image1, "[^0-9a-zA-Z_]", "", "ALL")#
But I am having trouble stripping the invalid characters out of the upload.
Shouldn't this catch the error. if it doesnt insert shouldn't this catch send me to espn.
<cftry>
<cfset variables.newUUID=createUUID()>
<cfquery datasource="#application.myDSN#">
INSERT INTO gallery (name,image1,UUID)
VALUES ('#form.Name#','#form.image1#','#variables.newUUID#')
</cfquery>...
Thats what I thought also. But it keeps going as if it got inserted.
Ok here's the code I am using.
<cfset variables.newUUID=createUUID()>
<cfquery datasource="#application.myDSN#">
INSERT INTO gallery (name,image1,UUID)
VALUES ('#form.Name#','#form.image1#','#variables.newUUID#')
</cfquery>...
No I am not inserting inside a loop.
The value of #getnewID.newID# is nothing. What I am doing after I insert I am querying the db, to get the last ID. I am querying using your UUID statement. Its not inserting into the database. Keep in mind it does work, but after the 5th insert it...
By break I mean I get the error.
An error occurred while evaluating the expression:
#getimage.image1#
I've tried all of the examples you gave. And after I do the 5th insert. I get the error. I've stopped using the cfinsert and went to using a sql insert ie: INSERT INTO mytable. and i still...
No worries about the version thing, I am using your brain for help, and if knowing what version I have will help, then by all means ask. We are going to switch to 8, but as of now, I have tons of users asking why, does this keeping happening. So I am trying to appease the masses.
I've tried
<cftransaction>
<cfinsert ...>
<cfquery name="getNewID" datasource="table">
SELECT @@IDENTITY as NewID
</cfquery>
</cftransaction>
And it works for about 6 inserts then it breaks? I'll give the UUID a try.
I am using cf 5, I am going to upgrade to 8, but at this time I can not. I think using an older version might be one of the problems. I am using microsoft access 2003. I"ll give this a shot.
Here's the error message I get.
Error Diagnostic Information
An error occurred while evaluating the expression:
#getimage.image1#
Error resolving parameter GETIMAGE.IMAGE1
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
I...
I am having some trouble, I am uploading an image. Then I do an insert into a DB, and do a select to grab the last insert. But for some reason I'll get an error. I don't get the error all of the time, but I do get it enough where its becoming a problem. I am using cflock, because I was told...
help please I'll get this error at the most inconvient times. How can I get rid of these errors.
"The form data has expired, Please reload this page in your browser".
Someone told me to set a time out. that doesnt work. sometimes i get the error and sometimes i dont.
No I am using cf 7. It doesnt throw an error, nothing loads. It just brings up a blank page. I got around it, but I was wondering why it wasnt working.
<cfform format="flash" onSubmit="return fieldcheck()" height="600" width="500">
Can anyone explain to me why this doesnt work. It works if i remove the onsubmit?
Thanks for you help
I am trying to create line breaks in some output, using the rereplace tag. Here's what I have.
<cfoutput>#REReplace(sum.activities,"\n","<br>","all")#</cfoutput>
Here's what I would like the output to read!
Running
Jumping
Fishing
Football
Track
Where it puts a line break when the user...
I am having a problem. When users print there forms. The information in the text boxes aren't printing. Is there a way to print all of the info from a text box. The tag in question is!
<input type="text" name="address" size="17" maxlength="50">
What I typed into the box is the following.
I have...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.