you need to escape the apostrophies with 

<cfset vexperience=Replace(#strEXPERIENCE#, "'", "''", "ALL")>

then insert the new field into the query string.  I've been fighting this
problem for 6 months and this is the solution that seems to work best.
Preservesinglequotes doesn't work in this instance.

Hope this solves your problem

Bonnie
AGS


-----Original Message-----
From: Peter Theobald [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 28, 2000 10:55 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: SQL and apostrophes


--=====================_3684492==_.ALT
Content-Type: text/plain; charset="us-ascii"

I did just that. Now if the field has a double quote in it, it gets cut off
at that point (it looks like the end of the string). :-(

At 04:18 PM 7/28/00 -0400, Jake Hileman wrote:
>Just put it between double quotes. Most datatypes use doublequotes anyhow..
>so it would be
>last_name="O'Brien" and you should be okay.
>
>let me know if i'm retarded or not.. i probably am :-)
>
>jake
>----- Original Message -----
>From: "Peter Theobald" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>Sent: Friday, July 28, 2000 1:23 PM
>Subject: Re: SQL and apostrophes
>
>
>> --=====================_12476792==_.ALT
>> Content-Type: text/plain; charset="us-ascii"
>>
>> I'm having the same problem.
>>
>> At 04:03 PM 7/27/00 -0600, Nick Call wrote:
>> >Any SQL Server 7 gurus out there that know how to allow apostrophe's in
>SQL
>> >statements?  For example, last_name = 'O'Brien' chokes the query.
>> >
>> >TIA.
>> >Nick
>> >
>> >
>>
>>--------------------------------------------------------------------------
-
>---
>> >Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>> >To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>>
>>
>>
--------------------------------------------------------------------------
>-
>> Peter Theobald, Chief Technology Officer
>> LiquidStreaming http://www.liquidstreaming.com
>> [EMAIL PROTECTED]
>> Phone 1.212.545.1232 Fax 1.212.679.8032
>>
>> --=====================_12476792==_.ALT
>> Content-Type: text/html; charset="us-ascii"
>>
>> <html>
>> <font size=3>I'm having the same problem.<br>
>> <br>
>> At 04:03 PM 7/27/00 -0600, Nick Call wrote:<br>
>> <blockquote type=cite cite>Any SQL Server 7 gurus out there that know how
>> to allow apostrophe's in SQL<br>
>> statements?&nbsp; For example, last_name = 'O'Brien' chokes the
>> query.<br>
>> <br>
>> TIA.<br>
>> Nick<br>
>> <br>
>> <br>
>>
--------------------------------------------------------------------------
>----<br>
>> Archives:
>> <a href="http://www.mail-archive.com/cf-talk@houseoffusion.com/"
>eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/</a>
<
>br>
>> To Unsubscribe visit
>> <a
>href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/c
f
>_talk"
>eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;b
o
>dy=lists/cf_talk</a>
>> or send a message to [EMAIL PROTECTED] with 'unsubscribe'
>in the body. </font></blockquote><br>
>>
>> <font size=2><b><br>
>>
--------------------------------------------------------------------------
>-<br>
>> Peter Theobald, </b>Chief Technology Officer<br>
>> </font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a
>href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2
>color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
>> </u></font><font size=2>[EMAIL PROTECTED]<br>
>> <b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
>> </font></html>
>>
>> --=====================_12476792==_.ALT--
>>
>>
--------------------------------------------------------------------------
>----
>> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
>>
>
>---------------------------------------------------------------------------
---
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body. 


---------------------------------------------------------------------------
Peter Theobald, Chief Technology Officer
LiquidStreaming http://www.liquidstreaming.com
[EMAIL PROTECTED]
Phone 1.212.545.1232 Fax 1.212.679.8032

--=====================_3684492==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
<font size=3>I did just that. Now if the field has a double quote in it,
it gets cut off at that point (it looks like the end of the string).
:-(<br>
<br>
At 04:18 PM 7/28/00 -0400, Jake Hileman wrote:<br>
<blockquote type=cite cite>Just put it between double quotes. Most
datatypes use doublequotes anyhow..<br>
so it would be<br>
last_name=&quot;O'Brien&quot; and you should be okay.<br>
<br>
let me know if i'm retarded or not.. i probably am :-)<br>
<br>
jake<br>
----- Original Message -----<br>
From: &quot;Peter Theobald&quot; &lt;[EMAIL PROTECTED]&gt;<br>
To: &lt;[EMAIL PROTECTED]&gt;;
&lt;[EMAIL PROTECTED]&gt;<br>
Sent: Friday, July 28, 2000 1:23 PM<br>
Subject: Re: SQL and apostrophes<br>
<br>
<br>
&gt; --=====================_12476792==_.ALT<br>
&gt; Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
&gt;<br>
&gt; I'm having the same problem.<br>
&gt;<br>
&gt; At 04:03 PM 7/27/00 -0600, Nick Call wrote:<br>
&gt; &gt;Any SQL Server 7 gurus out there that know how to allow
apostrophe's in<br>
SQL<br>
&gt; &gt;statements?&nbsp; For example, last_name = 'O'Brien' chokes the
query.<br>
&gt; &gt;<br>
&gt; &gt;TIA.<br>
&gt; &gt;Nick<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt;<br>
&gt;------------------------------------------------------------------------
---<br>
---<br>
&gt; &gt;Archives:
<a href="http://www.mail-archive.com/cf-talk@houseoffusion.com/"
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/</a><
br>
&gt; &gt;To Unsubscribe visit<br>
<a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf
_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;bo
dy=lists/cf_talk</a>
or<br>
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in<br>
the body.<br>
&gt;<br>
&gt;<br>
&gt;
--------------------------------------------------------------------------<b
r>
-<br>
&gt; Peter Theobald, Chief Technology Officer<br>
&gt; LiquidStreaming <a href="http://www.liquidstreaming.com/"
eudora="autourl">http://www.liquidstreaming.com</a><br>
&gt; [EMAIL PROTECTED]<br>
&gt; Phone 1.212.545.1232 Fax 1.212.679.8032<br>
&gt;<br>
&gt; --=====================_12476792==_.ALT<br>
&gt; Content-Type: text/html; charset=&quot;us-ascii&quot;<br>
&gt;<br>
&gt; &lt;html&gt;<br>
&gt; &lt;font size=3&gt;I'm having the same problem.&lt;br&gt;<br>
&gt; &lt;br&gt;<br>
&gt; At 04:03 PM 7/27/00 -0600, Nick Call wrote:&lt;br&gt;<br>
&gt; &lt;blockquote type=cite cite&gt;Any SQL Server 7 gurus out there that
know how<br>
&gt; to allow apostrophe's in SQL&lt;br&gt;<br>
&gt; statements?&amp;nbsp; For example, last_name = 'O'Brien' chokes the<br>
&gt; query.&lt;br&gt;<br>
&gt; &lt;br&gt;<br>
&gt; TIA.&lt;br&gt;<br>
&gt; Nick&lt;br&gt;<br>
&gt; &lt;br&gt;<br>
&gt; &lt;br&gt;<br>
&gt;
--------------------------------------------------------------------------<b
r>
----&lt;br&gt;<br>
&gt; Archives:<br>
&gt; &lt;a
href=&quot;http://www.mail-archive.com/cf-talk@houseoffusion.com/&quot;<br>
eudora=&quot;autourl&quot;&gt;<a
href="http://www.mail-archive.com/cf-talk@houseoffusion.com/"
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/</a>&
lt;/a&gt;&lt;<br>
br&gt;<br>
&gt; To Unsubscribe visit<br>
&gt; &lt;a<br>
href=&quot;http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;amp;body
=lists/cf<br>
_talk&quot;<br>
eudora=&quot;autourl&quot;&gt;<a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;amp;bo"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;am
p;bo</a><br>
dy=lists/cf_talk&lt;/a&gt;<br>
&gt; or send a message to [EMAIL PROTECTED] with
'unsubscribe'<br>
in the body. &lt;/font&gt;&lt;/blockquote&gt;&lt;br&gt;<br>
&gt;<br>
&gt; &lt;font size=2&gt;&lt;b&gt;&lt;br&gt;<br>
&gt;
--------------------------------------------------------------------------<b
r>
-&lt;br&gt;<br>
&gt; Peter Theobald, &lt;/b&gt;Chief Technology Officer&lt;br&gt;<br>
&gt; &lt;/font&gt;&lt;font size=3
color=&quot;#0000FF&quot;&gt;&lt;b&gt;LiquidStreaming
&lt;/b&gt;&lt;/font&gt;&lt;a<br>
href=&quot;http://www.liquidstreaming.com/&quot;
eudora=&quot;autourl&quot;&gt;&lt;font size=2<br>
color=&quot;#0000FF&quot;&gt;&lt;u&gt;<a
href="http://www.liquidstreaming.com/"
eudora="autourl">http://www.liquidstreaming.com</a>&lt;/a&gt;&lt;br&gt;<br>
&gt; &lt;/u&gt;&lt;/font&gt;&lt;font
size=2&gt;[EMAIL PROTECTED]&lt;br&gt;<br>
&gt; &lt;b&gt;Phone&lt;/b&gt; 1.212.545.1232 &lt;b&gt;Fax&lt;/b&gt;
1.212.679.8032&lt;br&gt;<br>
&gt; &lt;/font&gt;&lt;/html&gt;<br>
&gt;<br>
&gt; --=====================_12476792==_.ALT--<br>
&gt;<br>
&gt;
--------------------------------------------------------------------------<b
r>
----<br>
&gt; Archives: <a
href="http://www.mail-archive.com/cf-talk@houseoffusion.com/"
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/</a><
br>
&gt; To Unsubscribe visit<br>
<a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf
_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;bo
dy=lists/cf_talk</a> or<br>
send a message to [EMAIL PROTECTED] with 'unsubscribe'
in<br>
the body.<br>
&gt;<br>
<br>
----------------------------------------------------------------------------
--<br>
Archives: <a href="http://www.mail-archive.com/cf-talk@houseoffusion.com/"
eudora="autourl">http://www.mail-archive.com/cf-talk@houseoffusion.com/</a><
br>
To Unsubscribe visit <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;body=lists/cf
_talk"
eudora="autourl">http://www.houseoffusion.com/index.cfm?sidebar=lists&amp;bo
dy=lists/cf_talk</a> or send a message to [EMAIL PROTECTED]
with 'unsubscribe' in the body. </font></blockquote><br>

<font size=2><b><br>
---------------------------------------------------------------------------<
br>
Peter Theobald, </b>Chief Technology Officer<br>
</font><font size=3 color="#0000FF"><b>LiquidStreaming </b></font><a
href="http://www.liquidstreaming.com/" eudora="autourl"><font size=2
color="#0000FF"><u>http://www.liquidstreaming.com</a><br>
</u></font><font size=2>[EMAIL PROTECTED]<br>
<b>Phone</b> 1.212.545.1232 <b>Fax</b> 1.212.679.8032<br>
</font></html>

--=====================_3684492==_.ALT--

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to