title: SQL does not read more than 65536 characters from a text column
body: <p>I have a text field in a table with other spatial types. As part of a SSIS package, I am using this text field to run an update (as a SQL task) on the same table and update the geometry and geography columns. I was able to successfully run the following query yesterday </p>
  
  <pre><code>UPDATE Location 
  SET [Geometry] = geometry::STGeomFromText(ShapeText, 4326).MakeValid()
  FROM Location 
  WHERE ShapeText IS NOT NULL
  </code></pre>
  
  <p>But, today it has been throwing the following exception:</p>
  
  <blockquote>
    <p>Msg 6522, Level 16, State 1, Line 10 A .NET Framework error occurred
    during execution of user-defined routine or aggregate "geometry": 
    System.FormatException: 24141: A number is expected at position 65536
    of the input.</p>
  </blockquote>
  
  <p>When I looked at the shape, its definitely a valid shape. So the problem is not in the shape but that SQL is only reading upto 65536 characters from the column. And it works when the shapetext is less than 65536 characters.</p>
  
  <p>It would be great if someone coud help me with this and let me know how to read more than 65536 characters from a text field.</p>