...

View Full Version : How View Image Stored in Access DB?



Bullschmidt
10-30-2003, 03:26 PM
A client has an OLE field called Signature in an Access database. The field contains a GIF image of a scanned signature (that a product has been received).

How can I show this image on an ASP page?

allida77
10-30-2003, 04:57 PM
If you can figure out the Content Type maybe:



rsView.Open strSQL, NewConn, adOpenDynamic, adLockOptimistic
On error Resume Next
If Not rsView.EOF Then

Response.ContentType=?
Response.BinaryWrite(rsView("Signature"))
End If
If err.Number <> 0 Then
Response.Write(err.Description)
End If

Roy Sinclair
10-30-2003, 07:27 PM
See this thread: http://www.codingforums.com/showthread.php?s=&threadid=23667

More threads on this subject are available by searching this forum for the word BLOB.

Bullschmidt
11-03-2003, 09:50 AM
Basically it all comes back to the fact that this can be done with a database like SQL Server (with its blob field) but not Microsoft Access (with its OLE field). But thank you for your responses!

M@rco
11-04-2003, 08:48 PM
I beg to differ... ;)
http://support.microsoft.com/default.aspx?scid=kb;EN-GB;175261
http://groups.google.com/groups?selm=01bcd977%24ca15e760%2491551dc7%40brian&oe=UTF-8&output=gplain

The first URL only covers Paintbrush files, but the basic principle is sound - simply skip to the real data using the header information from the second link. And no ActiveX is needed - you can do all this very efficiently in VBScript by using use the ADO.Stream object for fast binary data manipulation.

:)

Roy Sinclair
01-05-2004, 09:42 PM
See this (http://www.codingforums.com/showthread.php?s=&threadid=23667) thread for more information on handling blobs from ASP.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum