I have found the following asp.net code to be very useful when serving files from a database:
Response.AppendHeader(\"content-disposition\", \"attachment; fi
Thought this KB article on Microsoft support section is related to the discussion here How to raise a file download dialog box for a known mime type