Access 2000 Microsoft Picture / Picture to asp page

D

dug

Hi all,

Thanks in advance for the assist.
I have an access 2000 form with an OLE object field where I copy and
paste images from a word document or an excel document. This gets
inserted to the tables.

Now the question:
I want to print out the contents of that table in an HTML/ASP page.
That is the information associated with the picture and the picture
itself.

This will allow me to have the website online, update the database
offline (with copy and paste from word or excel) and then upload the
databsae to the site.

The issue is when I retrieve the image its all garbage. Is tehre a way
for me to correct this so that the image displayed is JPG/GIF. I dont
want like an embedded micrsoft doc, just the image itself.

Thanks again, hope someone can help, am in a real bind here.
 
A

Amy Blankenship

You'll probably need to have a second asp page that just serves up the
images for use in the mixed data/graphical page
http://www.4guysfromrolla.com/webtech/060100-1.shtml

However, you may find that mixing these elements just won't work, in which
case you'll probably have to resort to the better practice of placing your
image files on the server and just using the database to point to them. If
you work it right, you can build tools to upload the graphic and insert it
into the database without ever having to take your db off line.

HTH;

Amy
 
D

dug

I can easily create an asp page that uploads the imaegs to the server
and creates the link in the db. However I am trying to avoid this on
purpose. I want the functionaliy of drag and drop from word to the OLE
Object in access and then upload the db and display contents with asp.
As there is a ton of pictures to upload and they are all in Excel or
Word, it would mean saving each pic individually and uploading them.
The way that I am thinking of allows the drag and drop to access form
which is simpler. At the same time I can have a form to display all the
uploaded images and their details as an offline catalogue for the user
(only 1 user so no issues with synchronization).

The only issue that I have is when I copy and paste the image from word
or excel into the OLE Object field I get a Microsoft Picture or Picture
(excel) entry in the field. I need to be able to "convert" this via asp
to an image to be displayed. Or even convert this picture in access to
another form and use as to view it.

Thanks for the assist
 
A

Amy Blankenship

Did you even bother to look at the link I posted? It tells you exactly how
to do this...

-Amy
 
B

bob

The problem is that when you drag and drop, or copy and paste, you are creating an 'OLE Embedded object',
which is typically an uncompressed bitmap, further wrapped in proprietary headers etc. To serve the image
data directly from the database you need to store raw binary image data, in some standard format that a
browser can recognize (eg jpeg, gif, png), without headers or app-specific encoding.

This might be possible using code and freely available components, for example by using an OLE frame, handle
its modified/drop event (if there is a suitable one), save the contents to a temporary JPEG file (eg using
Stephen Lebans' sample of using the IJG library or GDI+), then load the file into the field as binary data.

Alternatively you could try using a third party component. We supply one such component, and in this case
you could simply bind the control to the relevant field, then just copy and paste the images.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top