日期:2014-05-17  浏览次数:20726 次

给oracle插入图片报错了
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletExceptionIOException {

String FileType=request.getContentType();
System.out.println(FileType);
String img=request.getParameter("Photo");
System.out.println(img);

String sql="update EMP_TES set(Photo) values(?) where epmno = 7369";
try{

File file = new File(img);
FileInputStream str=new FileInputStream(img);
System.out.println(str.available()); 
PreparedStatement ps=cn.prepareStatement(sql);

ps.setBinaryStream(1,str,str.available());
ps.executeUpdate();
ps.close();
}catch(Exception e){
System.out.println("取得记录错误:"+e.getMessage());
}
}



报错了:
取得记录错误:ORA-00927: 缺失等号


这个学期刚刚学J2EE,请教大侠,怎么解决这个问题
谢谢



表:
SQL> desc emp_tes;
 名称                                      是否为空? 类型
 ----------------------------------------- -------- ---------------------------

 EMPNO                                              NUMBER(4)
 ENAME                                              VARCHAR2(10)
 JOB                                                VARCHAR2(9)
 MGR                                                NUMBER(4)
 HIREDATE                                           DATE
 SAL                                                NUMBER(7,2)
 COMM                                               NUMBER(7,2)
 DEPTNO                    &n