存储过程出下:(
注:我使用的是oracle 10g)
procedure aaaa(i_vc2mob in varchar2, --用户号码
i_NUMSVCID in PLS_INTEGER default null, --SERVICECODEID
i_prodid in PLS_INTEGER default null, --产品ID
i_disordsrc in PLS_INTEGER, --退定来源
i_disordsrcid in NUMBER, --退定来源ID
i_datdisorder in date default sysdate, --退定时间
o_prodid out PLS_INTEGER, --返回产品ID
o_level out PLS_INTEGER, --返回用户级别
o_flag out PLS_INTEGER --返回状态
) is
在java中调用正确调用方法:
{
call aaaa('13472622059',1,1,21,4712032059528901,'',?,?,?)}
如果这样写
{
call aaaa('13472622059',1,1,21,4712032059528901,,?,?,?)}
就报如下异常:
java.sql.SQLException: ORA-06550: 第 1 行, 第 67 列:
PLS-00103: 出现符号 ","在需要下列之一时:
( - + case mod new not null
others <an identifier> <a double-quoted delimited-identifier>
<a bind variable> avg count current exists max min prior sql
stddev sum variance execute forall merge time timestamp
interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<一个带有字符集说明的可带引号的字符串文字>
<一个可带引号的 SQL 字符串>
符号 "null" 被替换为 "," 后继续。
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:215)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:954)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4223)
at com.pub.comm.db.DBDeal.callProcedures2(DBDeal.java:36)
at com.pub.comm.db.Test.<init>(Test.java:15)
at com.pub.comm.db.Test.main(Test.java:29)
posted on 2007-12-03 21:07
一凡 阅读(21919)
评论(0) 编辑 收藏 所属分类:
DATABASE