jdk: jdk1.5.0_11
oracle: 817
tomcat: 5.5.17
驱动:classes12.jar和ojdbc14.jar都试了一:事先在数据库表clob类型中自己手动插入数据了,
然后
在代码中:
if(rst.next()){
   oracle.sql.CLOB osc=(oracle.sql.CLOB)rst.getClob("t");
   c=osc.getSubString((long)1,(int)osc.length());
}就会报错:java.sql.SQLException: 类型长度大于最大值二:我用代码往clob字段类型的表插入时:
                String strSql1="insert into test (t,id) values(empty_clob(),'1')";
String strSql2="select t from test where id = 1 for update ";
String c="";
DBConnectionManager dbcm = null;
Connection conn=null;
PreparedStatement ste=null;
ResultSet rst=null;
try{
dbcm=DBConnectionManager.getInstance();
conn=dbcm.getConnection("oracle");
conn.setAutoCommit(false);
ste=conn.prepareStatement(strSql1);
ste.executeUpdate();
ste=null;

ste=conn.prepareStatement(strSql2);
rst=ste.executeQuery();

if(rst.next()){
oracle.sql.CLOB osc=(oracle.sql.CLOB)rst.getClob("t");
Writer w=osc.getCharacterOutputStream();//使用字符输出流 
         w.write("asdffffffffffffffffffasdfffffffffffffff\nasdfffffffffffff\t");
w.flush();
w.close();

}
conn.commit();
}
catch(Exception e){
e.printStackTrace();
}finally{
if(rst!=null){
   try{
rst.close();
     }
   catch(Exception e){
e.printStackTrace();
}
}
if(ste!=null){
try{
   ste.close();
   }
catch(Exception e){
 e.printStackTrace();
}
}
也是报错:java.io.IOException: Io 异常: End of TNS data channel代码操作都是在网上查的,都说没有问题,可我试了就是不好用,
驱动也换了,也不行,
oracle817数据库到底用什么驱动才行?