title: insert MSSQL more than 8000 characters in a nvarchar(max) field
body: <p>While using sql 2005, it appears I am unable to insert more than 8000 characters in a nvarchar(max) field.</p>
  
  <p>This is really puzzling. I have tried insert, update and update .write  with no luck.  I can't insert it completely in the console and in .net the error I consistently get is</p>
  
  <blockquote>
    <p>The data types text and varchar are incompatible in the add operator.</p>
  </blockquote>
  
  <p>The insert statement is</p>
  
  <pre><code>insert into tablename (columnname) values (' long text'); 
  </code></pre>
  
  <p>Update:</p>
  
  <pre><code>update tablename set columnname='long text' 
  </code></pre>
  
  <p>Everything is always truncated at 8000 characters (the text is 11,000 characters). Running a few tests, I see that </p>
  
  <pre><code>select @@textsize
  </code></pre>
  
  <p>gives 2147483647</p>
  
  <p>Any ideas what I might be doing wrong here?</p>