I'm trying to view an image from an access database that is stored as "long binary data"(My code with commeneted out attempts is below). I would prefer not to use a component and not to store the picture on the server seperately. Think it's something to do with the header but it just wont view anyway I try....
Response.Expires = 0
Response.Buffer = TRUE
' Const OLEHEADERSIZE = 78
Set cn = Server.CreateObject("ADODB.Recordset")
cn.Open "select * from News where ID=84", "DSN=news"
'if not cn.eof then
'nFieldSize = cn("Data").ActualSize
'oleHeader = cn("Data").GetChunk(OLEHEADERSIZE)
'imageBytes = cn("Data").GetChunk(nFieldSize - OLEHEADERSIZE)
' end if
Response.ContentType = "image/jpeg"
set cn = nothing