I have found the following asp.net code to be very useful when serving files from a database:
Response.AppendHeader(\"content-disposition\", \"attachment; fi
This header is defined in RFC 2183, so that would be the best place to start reading.
Permitted values are those registered with the Internet Assigned Numbers Authority (IANA); their registry of values should be seen as the definitive source.