|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Correct way to display an image from a db stored as an OLE object
I have been fighting with this for days now, and I can't seem to get it to work.
Images are stored in an Access db as an OLE object. I have the following on my page Code:
<img src="photo.asp?id=<%=id%>"> Photo.asp looks like this Code:
Dim pic_id
pic_id = Request("id")
Response.Expires = 0
Response.Buffer = TRUE
Response.Clear
Response.ContentType = "image/jpeg"
Set yomama = conntemp.Execute("SELECT picture FROM inventory WHERE serial='" & pic_id & "'")
Response.BinaryWrite yomama("picture")
Response.End
Images will not display. What is the correct way to display images from a db stored as OLE objects? |
|
#2
|
|||
|
|||
|
response.binarywrite works for me to display a picture uploaded and saved to an access db using AppendChunk. I'm not sure that means it's saved as an ole object, I always thought ole objects were links to another program rather than the actual binary data.
|
|
#3
|
|||
|
|||
|
Quote:
What does the code look like to display this? |
|
#4
|
|||
|
|||
|
Quote:
When you use appendchunk, what is the datatype of the field? |
|
#5
|
|||
|
|||
|
Actually i didnt get how to do the same.I have stored the Image in the database and the Datatype is OLE-Object i am using response.BinaryWrite() but its giving me Garbage values
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Correct way to display an image from a db stored as an OLE object |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|