>>| From: jason kufner [mailto:jasonkufner@;rio.com] 
>>| 
>>| <cfset AuthorBio = bookArray[43]>
>>| 
>>| <!--- insert authors BIO--->
>>| <cfquery name="newAuthorBio" 
>>| datasource="#application.dsn#">
>>| INSERT into authorBio (authorBio_authorId,
>>| authorBioDetail)
>>| VALUES
>>| (#session.authorPkey#,'#preserveSingleQuotes(AuthorBio)#')
>>| </cfquery>

<cfset AuthorBio = bookArray[43]>

Should be:

<cfset AuthorBio = Replace(bookArray[43], "'", "''", "ALL")>

Single apostrophe for SQL closes the field on the insert, so SQL needs
to see the single apostrophe escaped. This works in conjunction with
preservesinglequotes as you have it.

HTH

Erika

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to