Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>See <a href="http://www.codeproject.com/KB/aspnet/streamingblobhttp.aspx" rel="noreferrer">Download and Upload Images from SQL Server</a> for an article covering the topic, including efficient streaming semantics. You must use a <a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldatareader.aspx" rel="noreferrer"><code>SqlDataReader</code></a> opened with <a href="http://msdn.microsoft.com/en-us/library/system.data.commandbehavior.aspx" rel="noreferrer"><code>CommandBehavior.SequentialAccess</code></a>:</p> <blockquote> <p><strong>SequentialAccess</strong> Provides a way for the DataReader to handle rows that contain columns with large binary values. Rather than loading the entire row, SequentialAccess enables the DataReader to load data as a stream. You can then use the GetBytes or GetChars method to specify a byte location to start the read operation, and a limited buffer size for the data being returned.</p> </blockquote> <p>The linked article provides full code for creating a Stream backed by an SqlDataReader, you can simply <a href="http://msdn.microsoft.com/en-us/library/system.io.stream.copyto.aspx" rel="noreferrer"><code>Stream.CopyTo</code></a><a href="http://msdn.microsoft.com/en-us/library/system.web.httpresponse.outputstream.aspx" rel="noreferrer"><code>(HttpResponse.OutputStream)</code></a>, or use a byte[] chunked copy if you don't have .Net 4.0 yet.</p> <p>This follow up article explains <a href="http://rusanu.com/2011/02/06/filestream-mvc-download-and-upload-images-from-sql-server/" rel="noreferrer">how to use a FILESTREAM column for efficient streaming of large VARBINARY data</a> in and out of the database.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload