RE: Displaying Binay data from Access2000 - 3/20/2001 20:26:00
Ok I found this but I'm still a little confused.Put a regular <IMG> tag on your HTML page with the SRC attribute pointing to an ASP script, e.g. <IMG SRC="GetImage.asp?id=4"> The GetImage.asp script may look like this: <% Set db = Server.CreateObject("ADODB.Connection") db.Open "data" Set rs =db.Execute("SELECT BigBlob FROM Blobs where id = " & Request("id") ) Response.ContentType = "image/jpeg" '(or "image/gif") This is where I get lost. What is Content Disposition and how am I to know the Content Length? Can you explain this to me? ' let the browser know the file name Response.AddHeader "Content-Disposition", "filename=yourfile.ext" ' let the browser know the file size Response.AddHeader "Content-Length", "545645" Response.BinaryWrite rs("BigBlob") %>
|