467,885 Members | 1,311 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

JPG stored as long binary in database: how to write output as image in asp?

Hello,

For a while I am working with ThumbsPlus ( http://www.cerious.com/ ) as
manager for pics.
The benefit of the program is that it stores all kind of information in a
central Microsoft Database that easily can be manipulated.
A thumbnail of the picture is also stored in de MDB as long binary (jpeg
format)

I made a small script that extracts all kind of information of the MDB by
use of queries and ASP.
This works perfect for string/numerical information.

I am wondering if I can also write the stored (jpg)thumbnail to the asp file
so that I have a preview of my picture.

Can this be done? What is the syntax?
I tried already :

Response.BinaryWrite BinData

Where BinData is the contents of the Thumbnail field.
When I take a look at the MDB table in design view, the DataType of this
field is "OLE object", if I open the table, the contents of the field
displays "long binary data".

Has anybody an idea?

any help is appreciated!

tia
bartp

--

==========================================
Hyper A.R.T.
bart plessers
Paul Van Ostaijenlaan 4
3001 Heverlee
BELGIUM
tel: +32 (16) 23.40.85
fax: +32 (16) 23.41.06
==========================================


Jul 19 '05 #1
  • viewed: 5710
Share:
1 Reply
http://www.aspfaq.com/show.asp?id=2149

The third to last point is relevant to you. It refers you to some microsoft
documents regarding extracting the ole data.

Essentially, though, you'd create your page as normal with a reference in it
to a second page that returns the image. For example:

page1....

<img src="Page2.asp?PicID=99">
page2.asp

<%
Response.BinaryWrite........etc.

%>
"bart plessers" <ba**********@hotmail.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hello,

For a while I am working with ThumbsPlus ( http://www.cerious.com/ ) as
manager for pics.
The benefit of the program is that it stores all kind of information in a
central Microsoft Database that easily can be manipulated.
A thumbnail of the picture is also stored in de MDB as long binary (jpeg
format)

I made a small script that extracts all kind of information of the MDB by
use of queries and ASP.
This works perfect for string/numerical information.

I am wondering if I can also write the stored (jpg)thumbnail to the asp file so that I have a preview of my picture.

Can this be done? What is the syntax?
I tried already :

Response.BinaryWrite BinData

Where BinData is the contents of the Thumbnail field.
When I take a look at the MDB table in design view, the DataType of this
field is "OLE object", if I open the table, the contents of the field
displays "long binary data".

Has anybody an idea?

any help is appreciated!

tia
bartp

--

==========================================
Hyper A.R.T.
bart plessers
Paul Van Ostaijenlaan 4
3001 Heverlee
BELGIUM
tel: +32 (16) 23.40.85
fax: +32 (16) 23.41.06
==========================================


Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Srdjan Pejic | last post: by
1 post views Thread by Russ Reynolds | last post: by
6 posts views Thread by hurricane | last post: by
1 post views Thread by Charlie | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.