我用的是jspsmartupload上传文件
String title1=su.getRequest().getParameter( "title ");
String description1=su.getRequest().getParameter( "description ");
//将上传文件信息保存到数据库
String sql= "insert into uploadFileInfo (file_name,file_size,file_type,title,description)Values(’ "+file.getFileName()+ "’, ' "+file.getSize()+ " ',’ "+file.getFileExt()+ " ', ' "+title1+ " ', ' "+description1+ " ') ";
setupload.executeUpdate(sql);
sql在sql*plus中执行没有错误。
------解决方案--------------------
涉及到中文么?看看编码什么的有没有问题
------解决方案--------------------
String sql= "insert into uploadFileInfo (file_name,file_size,file_type,title,description)Values(’ "+file.getFileName()+ "’, ' "+file.getSize()+ " ',’ "+file.getFileExt()+ " ', ' "+title1+ " ', ' "+description1+ " ') ";
楼主没发现用的是全角的单引号吗 '’