473,394 Members | 1,709 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
1 5964
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Srdjan Pejic | last post by:
Hello, I have a problem that I have not been able to solve, even after searching the web. I have stored couple of images in the MySQL database and I am trying to get them displayed on a web page...
1
by: Russ Reynolds | last post by:
Problem: I'm writing a client app. that needs to download an image file (non-text) from a remote location and save to the client machine. Here is what I have so far (pseudocode): import...
0
by: bart plessers | last post by:
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...
6
by: hurricane | last post by:
Hi to all, excuse my english ( i'm an italian student... ) I have the necessity of make a stored procedure that convert one parameter passed from base64 to binary before store in a field...
8
by: Jerry | last post by:
I have an off-the-shelf app that uses an Access database as its backend. One of the tables contains a field with an "OLE Object" datatype. I'm writing some reports against this database, and I...
1
by: Charlie | last post by:
Hi: When storing images (.gif, .jpg) in binary fields in SQL Server, how do I bind them to asp.net image control without first writing them to a file and attaching to URL property? For example,...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
0
sashi
by: sashi | last post by:
BLOB - Retieve image stored in database Dim CN As New ADODB.Connection Dim RS As ADODB.Recordset Dim DataFile As Integer, Fl As Long, Chunks As Integer Dim Fragment As Integer, Chunk() As...
1
by: TommyC | last post by:
Hi all, I fail to write the image data to binary PGM format (P5). Let's say i have to write a image data into PGM P5 format. I have the information for width, height, Y_min, Y_max, XL, XR and the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.