oracle的clob字段的存取问题?
插入操作的代码为:
.....
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,userid);
byte [] bStr = content.getBytes();
ByteArrayInputStream bis = new ByteArrayInputStream(bStr);
pstmt.setAsciiStream(2, bis ,content.length());
pstmt.executeUpdate();
.....
读取操作的代码为:
.....
try{
CLOB clob = (oracle.sql.CLOB)rs.getClob(fldname);
if(clob!=null){
BufferedReader br=new BufferedReader(clob.getCharacterStream());
String data = null;
if((data = br.readLine())!=null)
strinfo.append(data);
try {
while ( (data = br.readLine()) != null)
strinfo.append('\r').append('\n').append(data);
}
catch(Exception ex){
}
}
}
catch(Exception e){
}
.....
为什么我存入的中文取出来的都是问号呢????e文的就没有问题,请csdn上各位高手相助!!