title: How to Stream data from/to SQL Server BLOB fields?
body: <blockquote>
    <p>For the background to this question,
    see <em><a href="https://stackoverflow.com/questions/2101149/how-to-i-serialize-a-large-graph-of-net-object-into-a-sql-server-blob-without">“How to I serialize a large
    graph of .NET object into a SQL Server
    BLOB without creating a large
    buffer?”</a></em> that now has a large
    bounty on it.</p>
  </blockquote>
  
  <p>I wish to be able to use a <a href="http://msdn.microsoft.com/en-us/library/system.io.stream(VS.71).aspx" rel="nofollow noreferrer">Stream</a> object to read/write data to/from a BLOB field in a SQL Server row without having to put the <strong>all</strong> the data into a temp buffer.</p>
  
  <hr>
  
  <p>If the above can be done...</p>
  
  <p>As the Streams class has lot of <code>CanXXX()</code> methods, not all streams can be used by all methods take accept stream inputs/outputs. </p>
  
  <p>So how capable does a stream have to be to work with <a href="http://en.wikipedia.org/wiki/ADO.NET" rel="nofollow noreferrer">ADO.NET</a> when sending data to/from SQL Server?</p>
  
  <hr>
  
  <p>I am looking to have a standard Stream to which I can pass it on to other APIs.  </p>
  
  <p>Also the two answers so far only covers getting data form SqlServer, not <strong>sending</strong> the data to SqlServer.</p>