RE: quot problem

2001-01-15 Thread DeVoil, Nick

> Is anybody have problem about using sql statement with quot( " ) and
single
quot( ' ) insert or query from database and for retrieve and display in
coldfusion.

Check out the PreserveSingleQuotes() function

Nick


**
Information in this email is confidential and may be privileged.
It is intended for the addressee only. If you have received it in error,
please notify the sender immediately and delete it from your system. 
You should not otherwise copy it, retransmit it or use or disclose its
contents to anyone. 
Thank you for your co-operation.
**

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: quot problem

2001-01-15 Thread bflynn

There is also a CF Function to deal just with single quotes in data, oddly
enough called PreserveSingleQuote.  Double quotes inside single-quoted text
shouldn't be a problem.  

The following code bombs...


insert into table values ('#var#)


This code works:


insert into table values ('#PreserveSingleQuotes(var)#')


The SQL output is:
insert into table values ('Brian''s Book')

Brian

-Original Message-
From: Ryan [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 10:34 AM
To: CF-Talk
Subject: RE: quot problem


I've never had a problem with single or double quotes, am I missing
something? I always use CFQUERYPARAM when inserting data, so the
data can contain all the single and double quotes it wants. Is
there a problem selecting and displaying the data?

If you are talking about displaying the data in a form field, then
I have experienced that problem:  causes
problems. I don't allow double quotes at all in my text fields.

R
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists