当前位置: 技术问答>java相关
Blob插入ORACLE中有问题,HELP!(马上给分)
来源: 互联网 发布时间:2017-04-09
本文导语: String ISBN = request.getParameter("ISBN"); String ptitle = request.getParameter("title"); String author = request.getParameter("author"); String journal =request.getParameter("journal"); String pdate = request.getParameter("pdate"); String...
String ISBN = request.getParameter("ISBN");
String ptitle = request.getParameter("title");
String author = request.getParameter("author");
String journal =request.getParameter("journal");
String pdate = request.getParameter("pdate");
String introduction = request.getParameter("introduction");
String fulltext = request.getParameter("fulltext");
...
Connection conn = null;
PreparedStatement pstmt = null;
FileInputStream fis=null;
File file = new File(fulltext);
try{
fis = new FileInputStream(file);
} catch(FileNotFoundException e) {
return ("
}
...
pstmt = conn.prepareStatement ("insert into mypaper values ('"+ISBN+"','"+ptitle+"','"+author+"','"+journal+"',to_date('"+pdate+"','mm/dd/yyyy'),'"+introduction+"',fis)");
pstmt.execute ();
不知道哪里问题?老是报ORA-00984 COLUMN NOT ALLOWED HERE
BLOB这样插入行吗? 是PDF文档
大家指条明路吧!!!
String ptitle = request.getParameter("title");
String author = request.getParameter("author");
String journal =request.getParameter("journal");
String pdate = request.getParameter("pdate");
String introduction = request.getParameter("introduction");
String fulltext = request.getParameter("fulltext");
...
Connection conn = null;
PreparedStatement pstmt = null;
FileInputStream fis=null;
File file = new File(fulltext);
try{
fis = new FileInputStream(file);
} catch(FileNotFoundException e) {
return ("
" + e + "
n");}
...
pstmt = conn.prepareStatement ("insert into mypaper values ('"+ISBN+"','"+ptitle+"','"+author+"','"+journal+"',to_date('"+pdate+"','mm/dd/yyyy'),'"+introduction+"',fis)");
pstmt.execute ();
不知道哪里问题?老是报ORA-00984 COLUMN NOT ALLOWED HERE
BLOB这样插入行吗? 是PDF文档
大家指条明路吧!!!
|
刚发现你是“绿鸟”啊,呵呵~