Image Album

R

Rudodoo

Is there any type of software out there that will allow me to insert image
with my Access data? Which will let me post on the web
 
M

Mike Labosh

Is there any type of software out there that will allow me to insert image
with my Access data? Which will let me post on the web

Access provides an "OLE Object" data type for inserting images, as well as
other things, but that's EVIL. It will bloat your database with OLE goop
for each item, and it will be near impossible for a web page / ASP / ASP.NET
/ JSP (whatever) to dig the OLE image out.

Here's something way easier:

Put your images in a virtual folder on your web application, and in your
database, store a table of their URL's like this:

ImageID URL
1 /images/this.jpg
2 ../catalog/that.jpg
3 http://www.microsoft.com/stealthis.gif
....

Then, in your ASP code, you can get it from the database with ADODB, and use
a snip like this to display it (assuming you got a recordset from that
table:

<IMG src="<% = rs("URL") %>">

--
Peace & happy computing,

Mike Labosh, MCSD

"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane
 
B

bob

The OLE Object field-type itself doesn’t add headers, bloat or ‘goop’ [nice description :) ], it simply
stores whatever is put into it, and with negligible overhead compared to the file-system. It’s the use
of OLE Embedding, e.g. with a bound object frame or ‘insert object’, that gives rise to these problems.


If the images are stored as raw binary data there’s no bloat and it’s easy to stream the data directly
out to a browser. The code listings in the following sample illustrate how to do this with ASP. Although
the sample does use our own control in an Access form to store the images, the ASP is applicable to any
approach that stores raw binary data.

http://www.ammara.com/support/samples/showsam475d.html
 
Top