See http://technet.oracle.com/sample_code/tech/java/sqlj_jdbc/htdocs/templates.h tm#Streams
-----Original Message----- From: Bo Yang [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 11:09 AM To: JDJList Subject: [jdjlist] CLOB in Java Hello, A column in a table is defined as CLOB type. I have the following code snippet: String sql = "insert into Statements values('7500090000000019',to_date('2002-11-20','YYYY-MM-DD'),?)"; String clobString = "Some string that is larger than 4000 chars, in this case it is 5618"; //A real string length is 5618 stmt = conn.prepareStatement(sql); stmt.setString(1, clobString); When code gets executed to the above point, it throws an Exception as follows: java.sql.SQLException: Data size bigger than max size for this type: 5618 There is a setClob() method for PreparedStatemen as follows: public void setClob(int i,Clob x)throws SQLException; However, CLOB is just an interface in JDK. Could you throw some lights on how to get a CLOB object that can set a Java String object? By the way, how big a String can hold? Thanks. Bo __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com ______________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm ______________________________________________ To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm
