Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>This does not load the file into memory before transmitting it back to the client (to my understanding) and as such is nice and speedy.</p> </blockquote> <p>Correct, but remember to set <code>Response.BufferOutput</code> to false, the default value is true.</p> <blockquote> <p>Am I going to be better off not bothering with the Linq to SQL and doing things more directly?</p> </blockquote> <p>If you don't want to load the entire binary content into memory first then yes. Here's <a href="https://stackoverflow.com/questions/5429947/supporting-resumable-http-downloads-through-an-ashx-handler/6475414#6475414">an example</a> for streaming binary data from a database (along with enabling resumable download functionality).</p> <blockquote> <p>I'm beginning to wonder why I bothered with FILESTREAM in the first place and didn't just stick to managing the files myself</p> </blockquote> <p>The primary benefit is data integrity with transactional support and inclusion in database backups so you don't have to worry about disparity between database backup and file system backup. The downside has always been performance, which is what this whole filestream feature is trying to overcome. Although if they're less than 1mb on average according to <a href="http://msdn.microsoft.com/en-us/library/gg471497%28v=sql.110%29.aspx#whentouse" rel="nofollow noreferrer">this document</a> it's actually faster stored in the database than in the file system.</p> <p>In Sql Server 2012 there's a new feature coming called <a href="http://lennilobel.wordpress.com/2011/09/11/its-a-file-system-its-a-database-table-its-sql-server-denali-filetable/" rel="nofollow noreferrer">FileTables</a> that builds on FileStream support. Basically it acts like a database view of a filesystem directory in that files added to that directory are automatically added to the database FileTable (is a fixed schema table, which contains a Filestream binary column for the file, that you can link to from other tables). This would then allow you to retrieve a path to the file that you can feed to your <code>Response.TransmitFile(...)</code> function, yet still benefit from sql Filestream support.</p>
    singulars
    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.
    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