469,270 Members | 1,778 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,270 developers. It's quick & easy.

Reading Bitmaps from an Access database

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

Aug 7 '07 #1
0 1202

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Brad Smalling | last post: by
reply views Thread by martinjeffreys | last post: by
1 post views Thread by Tim Shih | last post: by
1 post views Thread by Mark Evans | last post: by
2 posts views Thread by Mike | last post: by
3 posts views Thread by billgadget | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.