请帮我看看这个blob问题[jsp处理blob] 我略微有点头绪了,在我的数据库连接gisconn中,我没有定义PreparedStatement,可能是这个错误吧!那各位大虾,我该如何定义这个PreparedStatement方法呢??请赐教! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我转化了思路,现在没有出现错误,但是数据库中却插不了记录以下这个程序,运行的时候没有报错,但是不能把数据插到数据库中去,为什么啊?我晕了!<% Class.forName("oracle.jdbc.driver.OracleDriver"); Connection conn= DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:wjg","bbs","bbs"); conn.setAutoCommit(false); Statement stmt=conn.createStatement(); //File file=new File("c:\\a.gif"); //InputStream is=new FileInputStream(file); //System.out.print(file.length()); //PreparedStatement pstmt=conn.prepareStatement("INSERT INTO img values(?)"); PreparedStatement pstmt=conn.prepareStatement("insert into img(id,pic) values('123',empty_blob())"); //pstmt.setString(1, "123"); //pstmt.setBlob(2, empty_blob()); //pstmt.setBinaryStream(1,is,(int)file.length()); pstmt.executeUpdate(); pstmt.close(); %> 能指导吗? 求一本oracle的英文电子书。 PL/SQL GOTO 怎么用??? 寻求分组sql,在线等待 主键列排序 oracle 导数据 PL/SQL数据生成器问题 真正的趋势:自动化代替人完成基本的物质生产。 请教:关于sql*plus的字节单位的设置问题 安装oracle时老出错,谁来指点一下 請大家幫我優化一下 在创建表时怎么设置才能让一个字段自动增加(sql server中有) ORACLE 8i 安裝
<%
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn= DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:wjg","bbs","bbs");
conn.setAutoCommit(false);
Statement stmt=conn.createStatement();
//File file=new File("c:\\a.gif");
//InputStream is=new FileInputStream(file);
//System.out.print(file.length());
//PreparedStatement pstmt=conn.prepareStatement("INSERT INTO img values(?)");
PreparedStatement pstmt=conn.prepareStatement("insert into img(id,pic) values('123',empty_blob())");
//pstmt.setString(1, "123");
//pstmt.setBlob(2, empty_blob()); //pstmt.setBinaryStream(1,is,(int)file.length());
pstmt.executeUpdate();
pstmt.close();
%>
能指导吗?