Hi Bruce,

I would try (not sure if it will work, but it's an easy change to make) is to use the URLEncodedValue function on the field that potentially contains quotes.  It should replace the quotes with the hex sequence:

value="#URLEncodedValue(form.CATPurpose)#"

Hope that helps,
Ramsey

At 02:28 PM 6/24/2003, you wrote:
I need to have quotation marksinserted into fields in our SQL Server 2000 tables when the user types them into the form field.  However, what now happens is SQL Server 2000 cuts off the the text the user typed into the form field when it reaches the first quotation mark.  My code for the insert is below.
 
I believe this has something to do with quotation marks normally being used to surround the text that should be inserted.  How do I make SQL Server 2000 include the quotation marks users type into the text box?
 
Thanks for the help.
 
Bruce
 
<cfquery  datasource="#dsn#" name="insertcat">
 update categories
 set catname_internal = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATNAME_Internal#">,
 catname_display = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATNAME_Display#">,
 CATRequireProposal=<cfif isdefined("form.CATRequireProposal")>
  <cfqueryparam cfsqltype="CF_SQL_BIT" value="1">
 <cfelse>
  <cfqueryparam cfsqltype="CF_SQL_BIT" value="0">
 </cfif>,
 CATPurpose = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATPurpose#">,
 CATTime = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATTime#">,
CATAttendance = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATAttendance#">,
 CATSubmission = <cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#form.CATSubmission#">,
CATUploadPapers=<cfif isdefined("form.CATUploadPapers")>
  <cfqueryparam cfsqltype="CF_SQL_BIT" value="1">
 <cfelse>
  <cfqueryparam cfsqltype="CF_SQL_BIT" value="0">
 </cfif>
 <cfif len(form.callforpaperfile)>
 ,CatAcceptEmail=<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#file.serverfile#">
 </cfif>
 where catid = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#form.catid#">
 </cfquery>
 
Bruce Phillips
Society of Teachers of Family Medicine
913-906-6000 ext 5405
[EMAIL PROTECTED]
______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/[EMAIL PROTECTED] Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]

Reply via email to