Reading Bitmaps from an Access database

Reading Bitmaps from an Access database

am 07.08.2007 19:47:22 von 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