Reading Bitmaps from an Access database

J

jason

I have an access database with a field of "OLE Object" that has
bitmaps. I'm trying to output these bitmaps to an ASP page viewed in
a
webbrowser.
This is how I'm attempting to do this now:
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=GLGInventory"

strSQL = "SELECT * FROM TableWebThumbs WHERE ID = " &
Request.QueryString("ID") & ""
Set rst = conn.Execute(strSQL)


Response.ContentType = "image/bmp"
' let the browser know the file name
'Response.AddHeader "Content-Disposition", "attachment;filename=" &
Trim(rs("filename"))
' let the browser know the file size
'Response.AddHeader "Content-Length", rs("filesize")
Response.BinaryWrite rst("Thumbnail").value


rst.Close
Set rst = nothing
conn.Close
Set conn = nothing
%>


I get a nice red X for an unknown image.
Any ideas would be helpful.


Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top