CLOB insert problem in Oracle Text [message #76069] |
Sat, 18 October 2003 08:13 |
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
|
|
|
|
|