Home » Server Options » Text & interMedia » CLOB insert problem in Oracle Text
CLOB insert problem in Oracle Text [message #76069] Sat, 18 October 2003 08:13 Go to next message
rabbit
Messages: 6
Registered: October 2003
Junior Member
Hi,
i have a question for clob-Datatyp in oracle text. I want to store MS office, pdf und html files in my clob column (I have tried to use setAsciiStream or setCharacterStream for insert). But i recieve always the error message:
java.sql.SQLException: ORA-01401 inserted value too large for column.

I use thin driver and windows server 2003.

my table:
CREATE TABLE texttable_intern(text_id int PRIMARY KEY not null, titel varchar2(500), author varchar2(20), datum date, text_size int, text_typ varchar2(5), content CLOB)

Programmcode:
File fil = new File(path + "Text_ordner" +j);
String fil_list[[]] = fil.list();
......
f_ordner[[f_nr]] = new File(path + "Text_ordner" + j + "//" + fil_list[[f]]);
......
PreparedStatement pstmt = conn.prepareStatement("INSERT INTO texttable_intern VALUES(?, ?, ?, ?, ?, ?, ?)");
for (int ef=1; ef<=anzahl_summe; ef++){
pstmt.setInt(1, ef);
pstmt.setString(2, ftitel[[ef]]);
pstmt.setString(3, fauthor[[ef]]);
pstmt.setDate(4, fdatum[[ef]]);
pstmt.setInt(5, (int)f_ordner[[ef]].length());
pstmt.setString(6, ftyp[[ef]]);
FileInputStream fis = new FileInputStream (f_ordner[[ef]]);
pstmt.setAsciiStream(7, fis, (int)f_ordner[[ef]].length());
// pstmt.setCharacterStream(7, new java.io.FileReader(f_ordner[[ef]]), (int)f_ordner[[ef]].length());
pstmt.execute();
fis.close();
}//end for

Can you tell me, what's wrong with this? What shall i do?

thanks

rabbit
Re: CLOB insert problem in Oracle Text [message #76070 is a reply to message #76069] Sun, 19 October 2003 04:36 Go to previous messageGo to next message
rabbit
Messages: 6
Registered: October 2003
Junior Member
thank you, i know what shall i do so that i can insert dokument in the clob column.

rabbit
Re: CLOB insert problem in Oracle Text [message #76081 is a reply to message #76069] Thu, 22 January 2004 07:05 Go to previous message
daniela
Messages: 2
Registered: March 2003
Junior Member
Could you please share your solution?

Thanks
Previous Topic: RUNNING REPORTS IN FORM
Next Topic: Oracle Text error:deadlock detected while waiting for resource
Goto Forum:
  


Current Time: Wed Apr 16 17:26:03 CDT 2014

Total time taken to generate the page: 0.10388 seconds