title: SQL Server DataType of TEXT does not maintain formatting
body: <p>I have to use a column with a datatype of TEXT in SQL Server 2005 to store a string that I need formatted with newlines and tab character for example.</p>
  
  <p>prior to calling the stored proc, I added a breakpoint to view the text I'm sending in the text visualizer in VS2010, and all formatting is exactly how I want it to be, but when I go the the cell in the database, and copy out the data, the formatting is lost. From what I can see, every time it a newline character or tab character is present in the string, the text datatype just replaces it with a space. For newlines I'm using vbNewline and for tabs I'm using vbTab or Xml.Formatting.Indented</p>
  
  <p>It's worth note that I can NOT change the data type of the column, because it's simply a table i have to use for a specific purpose.</p>
  
  <p>Any suggestions on getting this to format correctly in the database with at datatype of text?</p>
  
  <p>EXAMPLE:</p>
  
  <p>SQL Table Script Representing the table:</p>
  
  <pre><code>CREATE TABLE [dbo].[FooLog](
      [FooID] [int] IDENTITY(1,1) NOT NULL,
      [FooInfo] [text] NULL )
  </code></pre>
  
  <p>Stringbuilder code:</p>
  
  <pre><code>Dim sb As New StringBuilder()
  
  sb.AppendFormat("{0}{1}", "Some text", vbNewLine)
  sb.AppendLine("Some foo bar data")
  sb.AppendLine(String.Format("{0}data{1}{0}some more data", vbTab, vbNewLine))
  
  Dim stringToStoreInFooInfo As String = sb.ToString()
  </code></pre>
  
  <p>Store in db:</p>
  
  <pre><code>db.AddInParameter(cmd, "FooInfo", SqlDbType.Text, stringToStoreInFooInfo)
  </code></pre>
  
  <p>I'm not reading it back with code at the moment... I'm copying it out of the cell with Ctrl-C or right-click "copy"</p>