This answer is going to be less authoritative than you might have hoped, but no one else answered and I'll give it a try.
How are you entering the data?
Are you using a textarea or input type="text"?
How are you putting the data back into the db?
Are you using cfquery with an insert or update?
Are you using cfqueryparam to make sure the data looks right?
Are you using any string functions inside the cfquery?
If so, this can cause an issue. Single quotes are special in SQL, since they are the string delimiters. When inserting a single quote into SQL, you need to escape the single quote with an extra single quote (two together). Cold Fusion knows this, so it helps you out by automatically escapes any strings it is inserting into the cfquery tag. Unfortunately, it only does this if you output a string directly into the cfquery:
OK:
<cfquery name="q" datasource="datasource">insert into tbl FIELD values ('#value#')</cfquery>
Less OK (since the trim function prevents Cold Fusion from automatically escaping the single quotes):
<cfquery name="q" datasource="datasource">insert into tbl FIELD values ('#trim(value)#')</cfquery>
You should do any manipulation of variables outside of the cfquery, and simply output them inside the cfquery.
And not that you mentioned this, but it bites us all at first. Remember that when you output the memo field in HTML, it is not going to look the same as it will in a text area, (since HTML ignores carriage returns, tabs, extra spaces, etc.) You'll have to change the memo field data a little so it looks good in html.
And remember: all of the above could be completely wrong. =)
Does this help at all?
Jerry Johnson
>>> [EMAIL PROTECTED] 04/27/04 01:47PM >>>
Hello,
I'm working on an application that has memo fields for users to enter lots of text. I've had several users blow up the application becasue they used the "'" charater or quotes - is there a list anywhere of what characters are not permitted in a CF memo field?
More importantly, is there some "data in - data out" script to use, so that users can type whatever characters they need in their text?
Thanks,
Mark
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
