首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

System.Exception: ORA-06550 解决方法

2014-01-28 
System.Exception: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call

System.Exception: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ICS_USER_PAUSE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
 

------解决方法--------------------------------------------------------
字面上看是参数不对,个数不对或类型不对,最好把你的源码贴出来
------解决方法--------------------------------------------------------
在java里面调用存储过程.我可以给你看一个例子.
因为你的程序里面有封装.所以别人很难看出你的后台的类是否有问题的.
/**
* 调用存储过程p_dtsgfztj_getsql
* sql功能描述: 返回报表表体
* @param startDate 开始日期
* @param endDate 结束日期
* @return result sql语句:
* @throws DAOException 数据访问异常
*/
private static String getContent(String startDate, String endDate) throws
DAOException {
DBconn db = null;
String sql = null;
ResultSet rs = null;
Connection con = null;
CallableStatement call = null;
try {
db = new DBconn();
con = db.getConnection();
call = con.prepareCall("call p_dtsgdttj_getsql(?,?,?)");
call.registerOutParameter(3, java.sql.Types.VARCHAR);
call.setString(1, startDate);
call.setString(2, endDate);
rs = call.executeQuery();
sql = call.getString(3);
}
catch (ConnectionException e) {
throw new DAOException(e, "统计报表失败!");
}
catch (SQLException e) {
throw new DAOException(e);
}
finally {
if (rs != null) {
try {
rs.close(); //关闭结果集
}
catch (Exception e) {
e.printStackTrace();
}
}
if (call != null) {
try {
call.close();
}
catch (Exception e) {
e.printStackTrace();
}
}
if (con != null) {
try {
con.close(); //关闭连接
}
catch (Exception e) {
e.printStackTrace();
}
}
}
return sql;
}
------解决方法--------------------------------------------------------
paramList[1]=new OracleParameter("p_Rtcode",OracleType.Number);

把Number改为Integer试试?

        

热点排行