xjlk001 2005年03月25日
在JAVABEAN中调用存储过程出现了错误,请达人指点一下。在线等。
CREATE OR REPLACE PROCEDURE "COREMOUNT"."APPLY_NO_PLUS" (

NAME OUT VARCHAR2,
DEPARTMENT OUT VARCHAR2,
TYPE OUT VARCHAR2,
BEGIN_DATE OUT VARCHAR2,
END_DATE OUT VARCHAR2,
DAYS OUT NUMBER,
HOURS OUT NUMBER,
REASON OUT VARCHAR2)
IS
ADD_ONE VARCHAR2(100);
leaveapplyidadd number;
BEGIN

SELECT (MAX(to_number(LEAVE_APPLY_ID))+1) into leaveapplyidadd from COREMOUNT.FJ_LEAVE_APPLIES;

SELECT substr(max(apply_no),1,2)||lpad(to_char(max(to_number(substr(apply_no,2,length(apply_no))))+1),3,'0')
INTO ADD_ONE FROM COREMOUNT.FJ_LEAVE_APPLIES;

INSERT INTO COREMOUNT.FJ_LEAVE_APPLIES(
LEAVE_APPLY_ID,APPLY_NO,NAME,DEPARTMENT,TYPE,BEGIN_DATE,END_DATE,DAYS,HOURS,REASON)
VALUES(leaveapplyidadd,ADD_ONE,NAME,DEPARTMENT,TYPE,TO_DATE('BEGIN_DATE','YYYY-MM-DD HH24:MI:SS'),TO_DATE('END_DATE','YYYY-MM-DD HH24:MI:SS'),DAYS,HOURS,REASON);

END;

错误提示:
java.sql.SQLException: ORA-01722: 无效数字
ORA-06512: 在"COREMOUNT.APPLY_NO_PLUS", line 18
ORA-06512: 在line 1

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
at cn.com.fujia.oa.leaveapply.LeaveApplyMgrImpl.addLeaveApply(LeaveApplyMgrImpl.java:207)
at cn.com.fujia.oa.leaveapply.LeaveApplyMgr.addLeaveApply(LeaveApplyMgr.java:56)
at cn.com.fujia.oa.leaveapply.servlet.struts.LeaveApplyAddSaveAction.execute(LeaveApplyAddSaveAction.java:48)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:165)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
at cn.jado.lib.SetCharacterEncodingFilter.doFilter(Unknown Source)
at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
at com.caucho.server.http.Invocation.service(Invocation.java:315)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:534)
...全文
102 点赞 收藏 1
写回复
1 条回复

还没有回复,快来抢沙发~

发动态
发帖子
Oracle 高级技术
创建于2007-09-28

2925

社区成员

1.8w+

社区内容

Oracle 高级技术相关讨论专区
社区公告
暂无公告