try using oracle CLOB class ...but if it is from file then u must first store empty_clob() thru insert statement and then use the syntax of SELECT clobcolumn where ....FOR UPDATE
with the help of streams u can insert the data into the clob
Hareesh Ram Chanchali
SCJP 5.0, IBM Certified Solution Designer
Sanjay Dixit
Greenhorn
Joined: Feb 09, 2005
Posts: 1
posted
0
Originally posted by Kazeem Akinrinde: Please can anybody help with the most efficient way of saving a string into a java.sql.Clob column type of Oracle9i?
/* ------------------------------------------------------------------- * This program demonstrates a technique for converting a large String * to an oracle.sql.CLOB then inserting that CLOB into a database. * I believe most of this is specific to Oracle, specifically the * ability to create a temporary CLOB within your program. * ------------------------------------------------------------------- */ class TestOraCLobInsert {
public static void main (String args []) throws SQLException {
and since we are dealing with SQL Server and Oracle database, this code works fine for both. Since message is already a string, when it is casted to Object its string value is still preserved. Thanx once again Kazeem