It has the preservesinglequotes as the first try to fix the problem, then
the replacenocase as the second try to fix it.  Since the
preservesinglequotes isn't hurting anything, I left them in.  

Education is an input box (text) and description and experience are text
area's.

Thanks
Bonnie



-----Original Message-----
From: Phil Arnold [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 04, 2000 5:49 AM
To: [EMAIL PROTECTED]
Subject: RE: apostrophies troubles


> > Are you using PreserveSingleQuotes() on the string?
>
> 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>

Just one point, why are you doing the Replace() and then
PreserveSingleQuotes? They do effectively the same thing regarding SQL
queries.

One other quick question - what type of fields are Experience, Education and
Description?

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.

Reply via email to