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]

Reply via email to