我来帮你: Clob notes = rs.getClob("NOTES"); java.io.InputStream in = notes.getAsciiStream(); byte b = in.read(); // in contains the characters in the CLOB value designated by // notes as Ascii bytes; b contains the first character as an Ascii // bytegetCharacterStream materializes the CLOB value as a stream of Unicode characters Clob notes = rs.getClob("NOTES"); java.io.Reader reader = notes.getCharacterStream(); int c = Reader.read(); // c contains the first character in the CLOB that notes designates getSubString materializes all or part of the CLOB value as a String object String substring = notes.getSubString(10, 5); // substring contains five characters, starting with the tenth // character of the CLOB value that notes designates long len = notes.length(); String substring = notes.getSubString(1, len); // substring contains all of the characters in the CLOB object that // notes designates
setXXX(String xx)把xx能寸入CLOB字段里,clob 类型的 get 会是返回 string 吗?
我们还年轻牛奶会有的奶牛也会有的
可天天在 csdn 混这些会有吗 ??
很感谢你屡次解决我的疑难。
weblogic里sample里,有对CLOB的SET,但不知道GET可不可以。。
setXXX(String xx)把xx能寸入CLOB字段里,
但String getXXX时却不可以了,不报错误,也不显示任何内容?为何
Clob notes = rs.getClob("NOTES");
java.io.InputStream in = notes.getAsciiStream();
byte b = in.read();
// in contains the characters in the CLOB value designated by
// notes as Ascii bytes; b contains the first character as an Ascii
// bytegetCharacterStream materializes the CLOB value as a stream of Unicode characters
Clob notes = rs.getClob("NOTES");
java.io.Reader reader = notes.getCharacterStream();
int c = Reader.read();
// c contains the first character in the CLOB that notes designates
getSubString materializes all or part of the CLOB value as a String object String substring = notes.getSubString(10, 5);
// substring contains five characters, starting with the tenth
// character of the CLOB value that notes designates
long len = notes.length();
String substring = notes.getSubString(1, len);
// substring contains all of the characters in the CLOB object that
// notes designates