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: Convert varchar2 -> BLOB

Re: Convert varchar2 -> BLOB

From: Jeremy <newspostings_at_hazelweb.co.uk>
Date: Wed, 11 May 2005 15:39:26 +0100
Message-ID: <MPG.1cec296fc0b5cdd6989e68@news.individual.net>


In article <d5suqv$j64$1_at_news1.zwoll1.ov.home.nl>, Frank van Bortel says...
> Jeremy wrote:
> > Platform: Oracle 9ir2 on Solaris 9
> >

> Read UTP_HTTP - it has a read_raw procedure, too.
> OWA.GET_PAGE_RAW might help, too

There seems to be very little about either of these (with spelling corrections made) - seems "complicated" to get it working...

Seems to me I should be able to simply issue something like

utl_http.begin_request
utl_http.read_raw
utl_http.end_request

The documentation states that using read_raw if no length is specified as the 3rd argument then "this procedure will read as much input as possible to fill the buffer allocated"

Say you define say

l_raw raw(32767);

And the data that you want to return via read_raw is 64k say.. how do you get everything after the first 32k?

I am sure I am missing something very obvious here but am having trouble locating any examples of how this is all put together.
> >
> > 2nd question: what is easiest way of converting the stream of data that
> > we receive into a BLOB so that we can then reconstruct the original
> > file?
> >
>
> Not sure I understand - the blob contains the original file.
> Just write it, using e.g. UTL_FILE.

Yep that bit's fine - thanks.

REWRITE of need for this post:

Assume a binary doc exists at www.myhost.com/fred.doc and I want to get this into a BLOB in a PL/SQL procedure - what is the easiest way to get the file content (and you have to accept that the pl/sql proce needs to go an get the doc rathe rthan havie it passed-in somehow).

Thanks...

-- 

jeremy
Received on Wed May 11 2005 - 09:39:26 CDT

Original text of this message

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