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() reads trash

dbms_lob.loadfromfile() reads trash

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


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.

Any idea why ?

Andreas Jung

-- 
                                _\\|//_
                               (' O-O ')
------------------------------ooO-(_)-Ooo--------------------------------------
   Andreas Jung, Saarbrücker Zeitung Verlag und Druckerei GmbH
   Saarbrücker Daten-Innovations-Center
   Untertürkheimerstraße 15, D-66103 Saarbrücken, Germany
   Phone: +49-(0)681-502-1528, Fax: +49-(0)681-502-1509
   Email: ajung_at_sz-sb.de (PGP key available)
-------------------------------------------------------------------------------
Received on Tue May 23 2000 - 01:53:23 CDT

Original text of this message

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