用getString()在运行时会产生内存冲突错误,把weblogic服务器停止,可能是数据太多的原因。
解决方案 »
- jsp使用javamail: props.put("mail.smtp.host", "smtp.jspinsider.com"); 这样设置邮局服务器有问题
- java怎么生成swf缩略图?
- 数据库是int类型,往数据库增加的时候怎么让它显示null?在线等
- 请问ejbca 产生证书后,怎么样在自己的项目里进行整合,使用户登陆验证??
- derby数据库调用一直提示这样的错误,不知道是怎么回事
- 使用Uploadbean上传文件进数据库的问题
- 痛苦呀 jsp往ACCESS添加记录可就是提示找不到驱动 高手指教
- 常用的jdbc包都到哪里去下载?
- java文件操作问题 急!
- jsp运行jfreechart代码报错 请教各位大师了.
- servlet 里为什么显示不了时间日期
- 关于url的问题,急!急!急!
* To set a long (Stream) column
pstmt.setAsciiStream (1, <input-stream>, <input-stream-length>); If the string data is in Unicode format, then use setUnicodeStream.
pstmt.setUnicodeStream (1, <input-stream>, <input-stream-length>); For long raw columns, use setBinaryStream
pstmt.setBinaryStream (1, <input-stream>, <input-stream-length>);
create table streamexample (data long) PreparedStatement pstmt =
conn.prepareStatement ("insert into streamexample values (?)");
InputStream is = new FileInputStream ("notes.txt");
File file = new File ("notes.txt");
pstmt.setAsciiStream (1, is, (int)file.length ());
* To retrieve a long column
ResultSet rset =
stmt.executeQuery ("select * from streamexample");
InputStream ascii_data = rset.getAsciiStream (1); // Loop, reading from the gif stream and writing to the file
int c;
while ((c = ascii_data.read ()) != -1)
Systemm.out.print(c);