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: Selecting LONG RAWs

Re: Selecting LONG RAWs

From: Anthony Jackson <ajackson_at_et.byu.edu>
Date: Thu, 18 Jul 2002 10:33:40 -0600
Message-ID: <3D36EDE4.2060207@et.byu.edu>

Morten wrote:
> What's your target? Another table? The filesystem? There are several
> ways of reading the data, the proper way depends on what you wish to
> accomplish. You can read chunks using PL/SQL,
>

Good point, my target is really a web page. The data stored in the LONG RAWs are images. We are using OAS 4 for our web applications and *we* store our images on the filesystem or in LOBs to simplify things, but we're starting to select on tables that aren't our own so we've got to do things their way (which means LONG RAWS).

Storing to the filesystem is an option but if I can serve it with

        htp.print(utl_raw.cast_to_varchar2(v_LongContent));

then I won't bother filling up our server's filesystem with images.

Thanks for posting the code, I'm confident that it will work now. I was a bit disappointed in Oracle's 8i documentation and various popular 8i, PL/SQL and OAS books from the Oracle Press. All of them seem to indicate that piecewise reading of LONG RAWs is impossible in PL/SQL or is simply "beyond the scope of this book."

After I posted the questions, I found some good Pro*C code that I could make work through CGI, but then we'd have to install Pro*C, test it and when we'd upgrade to 9i we'd have to remember to transfer the CGI, etc..... In PL/SQL it's a lot easier.

Anyway,
Thanks Morten, your code is a life saver.

Anthony Received on Thu Jul 18 2002 - 11:33:40 CDT

Original text of this message

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