oracle读取clob大字段,报错:必须登录服务器,谁有解决办法?
读取代码如下:if (myclob != null) {
Reader is;
BufferedReader br = null;
try {
is = myclob.getCharacterStream();
br = new BufferedReader(is);
String s = br.readLine();
while (s != null) {
content += s;
s = br.readLine();
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
br.close();
}
}
读取代码如下:if (myclob != null) {
Reader is;
BufferedReader br = null;
try {
is = myclob.getCharacterStream();
br = new BufferedReader(is);
String s = br.readLine();
while (s != null) {
content += s;
s = br.readLine();
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
br.close();
}
}
--报错:必须登录服务器,谁有解决办法?--很明显,你都没登陆服务器,怎么读取clob字段?
请问zjgcv:你有详细点的解决方案吗?
补充一下问题环境:
一般的连接没有问题,用上面方法可以读取clob字段。
我现在修改成了rac连接方式,之后别的字段能读取,就是clob字段不能读取。
报错:[11-5-13 13:36:08:114 GMT+08:00] 0000035f SystemErr R java.sql.SQLException: 必须登录到服务器