Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to load pictures in Oracle 8?

Re: How to load pictures in Oracle 8?

From: <tedchyn_at_yahoo.com>
Date: Mon, 26 Jul 1999 13:47:34 GMT
Message-ID: <7nhotk$e0k$1@nnrp1.deja.com>


Thomas, Do you have corresponding code to retrieve the stored image and display it on a web browser(netscape or ie not appletviewer).

Thanks Ted

In article <379e75c7.98379432_at_newshost.us.oracle.com>,   tkyte_at_us.oracle.com wrote:
> A copy of this was sent to "jfguyard" <jfguyard_at_swissonline.ch>
> (if that email address didn't require changing)
> On Thu, 22 Jul 1999 12:19:47 GMT, you wrote:
>
> >Hi
> >
> >Could any oracle guru tell me how images (tiff, gif, jpeg) can be
> >loaded into Oracle 8?
> >Any further experience or recommandations are welcome.
> >
> >Thanks in advance and best regards.
> >
> >Jean François
>
> Here is one way to load:
>
> create table demo
> ( id int primary key,
> theBlob blob
> )
> /
>
> create or replace directory my_files as
'/export/home/tkyte/public_html';
>
> declare
> l_blob blob;
> l_bfile bfile;
> begin
> insert into demo values ( 1, empty_blob() )
> returning theBlob into l_blob;
>
> l_bfile := bfilename( 'MY_FILES', 'aria.gif' );
> dbms_lob.fileopen( l_bfile );
>
> dbms_lob.loadfromfile( l_blob, l_bfile,
> dbms_lob.getlength( l_bfile ) );
>
> dbms_lob.fileclose( l_bfile );
> end;
> /
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to
Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated
June 21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle
Corporation
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jul 26 1999 - 08:47:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US