title: INSERT query error: Implicit conversion from data type varchar to varbinary is not allowed. Use the CONVERT function to run this query.
body: <p>I am trying to run an insert query, but I am getting the error below. How can I pass the values into my insert statement? The value is coming from an array and the <code>[cNotes]</code> column type is <code>varchar NULL</code>. </p>
  
  <p>Thanks in advance.</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>        Error Executing Database Query.  
          [Macromedia][SQLServer JDBC Driver][SQLServer]Implicit conversion from data type varchar    to varbinary is not allowed. Use the CONVERT function to run this query.  
  
           The error occurred in C:\Inetpub\wwwroot\Components\Assessment.cfc: line 510
         Called from C:\Inetpub\wwwroot\Components\Assessment.cfc: line 440
  
            508 :                      ,NULL
            509 :                  &lt;/cfif&gt;
            510 :                   ,'#arguments.notes#') 
             511 :        &lt;/cfquery&gt;
            512 :     &lt;/cffunction&gt; 
  
  
  
             --------------------------------------------------------------------------------
  
              SQL    INSERT INTO AssessmentToolDetail(iAssessmentToolMaster_ID ,iServiceList_ID   ,cRowStartUser_ID ,Service_text ,cNotes) Values(251069 ,3592 ,NULL ,'y ' ,'')   
             DATASOURCE   TIPS4 
               VENDORERRORCODE   257 
              SQLSTATE   HY000 '
  </code></pre>
  
  <p><strong>CFC function:</strong></p>
  
  <pre><code>&lt;cffunction name="AddService" access="public" returntype="void" output="false"&gt;
      &lt;cfargument name="ServiceList" type="Components.ServiceList"  required="true"&gt;
      &lt;cfargument name="notes" type="string" required="false" default=""&gt;
      &lt;cfargument name="serviceText" type="string" required="false" default=""&gt;       
  
      &lt;cfquery name="AddServiceListQuery" datasource="#variables.dsn#"&gt;
          INSERT INTO AssessmentToolDetail (
                  iAssessmentToolMaster_ID
                  , iServiceList_ID
                  , cRowStartUser_ID
                  , Service_text
                  , cNotes )
          VALUES (
                 #variables.id#
                  ,#ServiceList.GetId()#              
                  &lt;cfif variables.rowStartUserId neq ""&gt;
                      , '#variables.rowStartUserId#'
                  &lt;cfelse&gt;
                      , NULL
                  &lt;/cfif&gt;
                  &lt;cfif ListFirst( Arguments.serviceText,'_' ) EQ ServiceList.GetId() &gt;
                      , '#Left(ListLast( Arguments.serviceText,'_'),1)# '
                  &lt;cfelse&gt;
                      , NULL
                  &lt;/cfif&gt;
                  ,  '#arguments.notes#'
                ) 
      &lt;/cfquery&gt;
  &lt;/cffunction&gt;
  </code></pre>