Yes, here's the query:
These let the single quotes into the database....without these the insert
errors out.
<cfset vdescription=Replace(#strDESCRIPTION#, "'", "''", "ALL")>
<cfset veducation=Replace(#strEDUCATION#, "'", "''", "ALL")>
<cfset vexperience=Replace(#strEXPERIENCE#, "'", "''", "ALL")>
This is the query doing the insert......
<cfquery name="InsertListing" datasource="#APPLICATION.EC_DSN2#">
INSERT INTO tblJobListings(PostingID, MemberNum,
ExpirationDate, Title,
Area, Experience, Education, Description,
ContactInfo)
VALUES (#vPostingID#, <CFIF numMEMNUM IS
"">0<cfelse>#numMEMNUM#</cfif>,
#CreateODBCDate(DateAdd("m", 2, Now()))#,
'#strTITLE#', '#strCITY#, #strSTATE#',
'#PreserveSingleQuotes(vexperience)#',
'#PreserveSingleQuotes(veducation)#',
'#PreserveSingleQuotes(vdescription)#',
'#formatCONTACTINFO#')
</cfquery>
-----Original Message-----
From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 30, 2000 10:37 AM
To: [EMAIL PROTECTED]
Subject: RE: apostrophies troubles
> Has anyone else had problems getting query insert statements to work with
> apostrophies in the text? I've had the problem on two different occasions
> even with putting a preservesinglequote around the offending field. I've
> finally just did a replacenocase on the apostrophies.
>
> I'm running CF 4.5 and Access 2000.
Are you using PreserveSingleQuotes() on the string?
It's there to escape the quotes so that SQL can understand what they are.
HTH
Philip Arnold
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
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.eGroups.com/list/cf-talk
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.