ORA-01008 not all variables boundCause: A SQL statement containing substitution variables was executed without all variables bound. All substitution variables must have a substituted value before the SQL statement is executed.
表结构如下: file_id varchar2(10) not null primary key,file_name varchar2(20),files BLOB; rs = stmt.executeQuery("SELECT file_name,files FROM t_test WHERE file_ID='0001'"); // if the resultset is not null if (rs.next()){
另外表的情况也说一下……
file_id varchar2(10) not null primary key,file_name varchar2(20),files BLOB;
rs = stmt.executeQuery("SELECT file_name,files FROM t_test WHERE file_ID='0001'");
// if the resultset is not null
if (rs.next()){
// Initialization
mySmartUpload.initialize(pageContext);
mySmartUpload.setTotalMaxFileSize(1024*1024*10); // Upload
mySmartUpload.upload(); if (!mySmartUpload.getFiles().getFile(0).isMissing()){ try { rs.updateString("file_name",mySmartUpload.getFiles().getFile(0).getFileName());
// Add the current file in the DB field
mySmartUpload.getFiles().getFile(0).fileToField(rs,"files");
// Update
rs.updateRow();
count++;
} catch(Exception e) {
out.println("An error occurs : " + e.toString());
}