Results 1 to 1 of 1
2005-09-07, 15:04 #1
- Join Date
- Jan 2001
- austin, Texas, USA
- Thanked 0 Times in 0 Posts
Web App - Displaying Docs from DB
OK, I've got the nut cracked for uploading files to SQL Server and listing what's on the db. When I put together the code to display the files I get garbage on the screen (using BinaryWrite on the RS object). Changing to Response.Write doesn't give me as much garbage but garbage it is. It occurs to me that you need different MIME settings on the display page depending on the content type of the file on the db, and put in some additional code to read that as well before building the page, but that doesn't do it either.
So then I wonder if this is a good idea anyway, to try and display files to the client using a webpage. But when I set the page to load to Save As using <font face="Georgia">Response.AddHeader "content-disposition", "attachment; filename=" & filename</font face=georgia> the file gets saved but on trying to open I get 'can't determine file type' when double-clicking. this is a .gif file. if i try to open it in an editor the same error occurs.
<img src=/S/compute.gif border=0 alt=compute width=40 height=20>