Re: Migrating WebdB to OAS problem/question

From: Leo Van Nieuwenhuyse <leo.van.nieuwenhuyse_at_pandora.be>
Date: Fri, 07 Apr 2000 21:53:56 GMT
Message-ID: <UNsH4.37109$l35.77620_at_afrodite.telenet-ops.be>


I somewhere found this package, can it help?

create or replace package image_get as
 procedure gif( p_id in demo.id%type );
end;
/
create or replace package body image_get as procedure gif( p_id in demo.id%type )is

 l_lob blob;
 l_amt number default 30;
 l_off   number default 1;
 l_raw   raw(4096);

begin
 select theBlob into l_lob
     from demo
     where id = p_id;

 owa_util.mime_header( 'image/gif' );
 begin
  loop
   dbms_lob.read( l_lob, l_amt, l_off, l_raw );    htp.prn( utl_raw.cast_to_varchar2( l_raw ) );    l_off := l_off+l_amt;
   l_amt := 4096;
  end loop;
 exception
  when no_data_found then
   NULL;
 end;
end;
end;
/

Joel Racicot <joel.racicot_at_canadapost.ca> schreef in berichtnieuws 38ECA806.4FB92BE9_at_canadapost.ca...
> I hope some of you have ideas that can help me through this one.
>
> I have to migrate a webdb site to OAS, which on the face of it is not a
> huge problem, since the site was built with the PL/SQL toolkit and webdb
> was used primarily as a listener. No components of the site were built
> using the webdb wizards.
>
> However, the images used on specific pages were stored in webdb's
> document table in BLOBs. Now, I need to get at these images without
> doing too much recoding. The current means of getting the images is to
> point to the document table path (../admin/docs/aa.gif). This then
> calls various procedures to extract the image from the table and render
> it to the web as if it had been in an image directory. The most obvious
> thing to do is create image directoryies and save the images in there.
> Unfortunately, managing this type of directory structure is not
> feasible, since we are going to have several hundred users creating
> pages (or sub sites) and potentially, we could have several thousand
> images. That why the table is the ideal vehicle for this type of
> thing. The only question is can I easily point the OAS listener to a
> table? If so, how? If not, any suggestions on how you would implement
> this type of set-up would be greatly appreciated.
>
> Thanks to all in advance for your help.
>
> Joel
>
Received on Fri Apr 07 2000 - 23:53:56 CEST

Original text of this message