Hi,
Phew! I think I'll just use my solution for now. In future I'll look at
yours, perhaps when I get Informix. Hypersonic isn't that sophisticated. As
far as I know (I have checked it out but I'm not 100% sure) it doesn't
support BLOBs. Thanks a lot for your help.
Regards,
Paul
>From: Huibert Aalbers <[EMAIL PROTECTED]>
>Reply-To: Orion-Interest <[EMAIL PROTECTED]>
>To: Orion-Interest <[EMAIL PROTECTED]>
>Subject: Re: Displaying image files stored in a database
>Date: Mon, 12 Feb 2001 12:28:49 -0600
>
>Hi,
>
>I have recently done what you are looking for using (not surprisingly if
>you
>take a look at my e-mail) an Informix database. I stored the images as
>blobs in
>the database and used a singleton class (called through a JSP custom tag)
>to
>retrieve the images to the file system and manage a cache which can be
>easily
>configured (size of the cache area and time before an image expires).
>Informix
>provides a function called blobtofile which makes if very easy to transfer
>the
>file from the database to the filesystem. This allows me to bypass the jdbc
>calls which are slower. You should however be able to do something similar
>with
>a java database like InstantDB (I am not sure about Hypersonic, since I
>have
>never used it). By storing the image inside a database you make sure that
>you
>maintain the data integrity and the cache allows you to get file system
>like
>performance.
>
>The result is a clean readable code in the JSP page. Here is an example:
>
> <ip:DownloadFromDB table="vs_images"
>column="image"
>indexColumn="content_id" index="<%=document.getId()%>" indexColumn2="order"
>index2="1" fromCache="false">
> <ip:Success name="file"
>type="InstantPortal.ImageFile">
> <IMG SRC="<%=file.getImageURL()%>">
> </ip:Success>
> <ip:NoResults>
> Empty
> </ip:NoResults>
> </ip:DownloadFromDB>
>
>Regards,
>
>Huibert
>
>
>[EMAIL PROTECTED] wrote:
>
> > Hi:
> >
> > How about creating an object that first deletes the image file
>referenced in
> > the database then deletes the record itself?
> >
> > Stefan
>
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.