怎么讲oracle序列转换成字符串?
我的程序代码如下:
if (!myFile.isMissing()) {
sql="select tsw_doc_seq.nextval from dual";
ResultSet rs=stmt.executeQuery(sql);
if(rs.next()) {
String seq=(String)rs.getString(1);
//out.print(seq);
}
file_name=seq+"."+myFile.getFileExt();
// out.print(file_name);
myFile.saveAs("/upload/" +file_name);
count++;
}
出错如下:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred between lines: 10 and 95 in the jsp file: /gwcl.jsp
Generated servlet error:
D:\tomcat4\work\localhost\_\gwcl$jsp.java:151: Undefined variable: seq
file_name=seq+"."+myFile.getFileExt();
^
Note: D:\tomcat4\work\localhost\_\gwcl$jsp.java uses or overrides a deprecated API. Recompile with "-deprecation" for details.
1 error, 1 warning
如何解决?