首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

ibatis中接受Clob门类的数据( Cause: java.sql.SQLException: ORA-22835: Buffer too small f)

2012-08-30 
ibatis中接受Clob类型的数据( Cause: java.sql.SQLException: ORA-22835: Buffer too small f)此前在使用

ibatis中接受Clob类型的数据( Cause: java.sql.SQLException: ORA-22835: Buffer too small f)

此前在使用中将CLOB类型的数据转化为可用String类型接受的属性的方法是to_char(......),但在其使用中发现,当其长度超过4000时就会抛出异常( Cause: java.sql.SQLException: ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion)

其实本身这么转换就存在问题,因为CLOB的长度最大可为4G,如此转换肯定会存在问题,以下是正确的转换方式:

在相应的informationRelease.xml文件如此表示

?

备注:在查询的sql语句中不能含有distinct,至于原因我也不太清楚。

热点排行
Bad Request.