I am either confused about the functionality you want, or the
functionality PreserveSingleQuotes provides.
PreserveSingleQuotes preserves single quotes for database inserts by
automatically escaping them. It needs a variable as the value, not a
string. I'm assuming you already have "Teacher's Group" in a variable?
<cfoutput>
<cfset temp = "Teacher's Group">
#PreserveSingleQuotes(temp)#
</cfoutput>
You could probably try to do something more using replace:
#Replace("Teacher's Group", "'", "''", "all")#
will return:
Teacher''s Group
At 11:55 AM 4/12/2002 -0400, you wrote:
>No, that preserves single quotes. I want to escape single quotes.
>
>Thanks,
>Matt Small
>
>-----Original Message-----
>From: Jeffry Houser [mailto:[EMAIL PROTECTED]]
>Sent: Friday, April 12, 2002 11:32 AM
>To: CF-Talk
>Subject: Re: Crosspost: Escaping single quotes
>
> Isn't there a function (PreserveSingleQuotes) that does this?
>
>At 11:38 AM 4/12/2002 -0400, you wrote:
> >Hi everybody,
> > I'm having a problem with an update to a table - the problem
>is
> >when I want to update or insert the string "Teacher's Group". CF
>throws
> >an error at me when I try this. I know that CF usually escapes the
> >single quote, but it's not in this case. I know I saw a post with on
> >this list or CFDJList about there being a bug with escaping single
> >quotes
> >in CF4.5. Anybody know how can I make CF escape the single quote for
> >insertion into my table? Thanks
> >
> >Matt Small
> >
> >
> >
> >
> >
>
>
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists