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

Home -> Community -> Mailing Lists -> Oracle-L -> dbms_lob.loadfromfile() read trash

dbms_lob.loadfromfile() read trash

From: Andreas Jung <ajung_at_sz-sb.de>
Date: Tue, 23 May 2000 08:29:56 +0200
Message-Id: <10505.106323@fatcity.com>


On Mon, May 22, 2000 at 06:36:30AM -0800, Atish Prasad Das wrote:
> it works on both.........
> ----- Original Message -----
> To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> Sent: Monday, May 22, 2000 7:14 PM
>
>
> > On Mon, May 22, 2000 at 04:24:18AM -0800, Atish Prasad Das wrote:
> > > use the function DBMS_LOB.LOADFROMFILE()......
> >
> > LOADFROMFILE applies to BFILEs but not to internal blobs.

However this will not work really.
My table looks like:

(docnum char(10),inhalt clob);

I am inserting the content of a XML file with the following code:

srcloc BFILE;
myclob clob;
...
srcloc :=BFILENAME('TMP','test.xml');

select inhalt into myclob from ojs_de where docnum='test' for update; dbms_lob.open(srcloc,dbms_lob.lob_readonly); dbms_lob.loadfromfile(myclob,srcloc,dbms_lob.getlength(srcloc)); commit;
dbms_lob.close(srcloc);

The CLOB column is initialized with empty_clob() during an insert earlier.

When I fetch the row the CLOB column just contains trash but not the contents of the test.xml file. Received on Tue May 23 2000 - 01:29:56 CDT

Original text of this message

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