W
wsyummy
Unregistered / Unconfirmed
GUEST, unregistred user!
如题,包中带函数,函数有一个整型返回值
create or replace package xsglpackage as
function get_fp(p_dm in char,p_ny in char,p_lb1 in char,p_lb2 in char) return number;
end xsglpackage;
调用如下:
public void execprc(String p_dm,String p_ny,String p_lb1,String p_lb2) throws Exception{
PS_FunName = "execprc()";
if (P_CCDB == null || P_CCDB.isClosed())
InitConnect();
ResultSet rs=null;
CallableStatement proc = null;
try {
proc = P_CCDB.prepareCall("{ ?=call xsglpackage.get_fp(?,?,?,?) }");
proc.registerOutParameter(1,Types.INTEGER);
proc.setString(2, p_dm);
proc.setString(3, p_ny);
proc.setString(4, p_lb1);
proc.setString(5, p_lb2);
proc.executeUpdate();
}
finally {
try {
proc.close();
}
catch (SQLException e) {}
P_CCDB.close();
}
}
出现如下错误:
java.sql.SQLException: ORA-06550: , 1 L, , 13 :
PLS-00201: 舺?? 'XSGLPACKAGE.GET_FP'
ORA-06550: , 1 L, , 7 :
PL/SQL: Statement ignored
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:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
at xstj.dbcon.execprc(dbcon.java:336)
at jsp_servlet.__test._jspService(__test.java:217)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.Authen
ticatedSubject.doAs(Authen
ticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
不知道怎么回事!!!!
create or replace package xsglpackage as
function get_fp(p_dm in char,p_ny in char,p_lb1 in char,p_lb2 in char) return number;
end xsglpackage;
调用如下:
public void execprc(String p_dm,String p_ny,String p_lb1,String p_lb2) throws Exception{
PS_FunName = "execprc()";
if (P_CCDB == null || P_CCDB.isClosed())
InitConnect();
ResultSet rs=null;
CallableStatement proc = null;
try {
proc = P_CCDB.prepareCall("{ ?=call xsglpackage.get_fp(?,?,?,?) }");
proc.registerOutParameter(1,Types.INTEGER);
proc.setString(2, p_dm);
proc.setString(3, p_ny);
proc.setString(4, p_lb1);
proc.setString(5, p_lb2);
proc.executeUpdate();
}
finally {
try {
proc.close();
}
catch (SQLException e) {}
P_CCDB.close();
}
}
出现如下错误:
java.sql.SQLException: ORA-06550: , 1 L, , 13 :
PLS-00201: 舺?? 'XSGLPACKAGE.GET_FP'
ORA-06550: , 1 L, , 7 :
PL/SQL: Statement ignored
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:582)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2149)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2032)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2894)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:608)
at xstj.dbcon.execprc(dbcon.java:336)
at jsp_servlet.__test._jspService(__test.java:217)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.Authen
ticatedSubject.doAs(Authen
ticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
不知道怎么回事!!!!