RECORD 类型与 JDBC 不兼容是真的吗?正在使用的驱动程序是 OJDBC6.jar
Java 代码:
dbStrategy.openConnection();
WrappedConnectionJDK6 wrapped = (WrappedConnectionJDK6) dbStrategy.getConnection();
OracleConnection oracleConnection = (OracleConnection) wrapped.getUnderlyingConnection();
CallableStatement callableStatement = oracleConnection.prepareCall("{call XXX_Info_Utl_Pkg.get_order_admin(?,?,?,?,?)}");
callableStatement.setInt(1, Integer.parseInt(orderNumber));
callableStatement.registerOutParameter(2, OracleTypes.ARRAY, "XXX_INFO_UTL_PKG.SEAGRS_ORDER_REC");
callableStatement.registerOutParameter(3, OracleTypes.NUMBER);
callableStatement.registerOutParameter(4, OracleTypes.VARCHAR);
callableStatement.registerOutParameter(5, OracleTypes.NUMBER);
和甲骨文代码:
PROCEDURE get_order_admin(
p_order_num_in IN NUMBER,
p_order_admin_out OUT XXX_info_utl_pkg.seagrs_order_rec,
p_error_code_out OUT PLS_INTEGER,
p_error_msg_out OUT VARCHAR2,
p_ret_status_out OUT PLS_INTEGER);
TYPE seagrs_order_rec
IS
record
(
order_admin VARCHAR2(10),
contact_name VARCHAR2(50),
contact_email_addr VARCHAR2(100),
contact_phone_num VARCHAR2(30));
我面临的错误是 -
例外:无效的名称模式:XXX_INFO_UTL_PKG.SEAGRS_ORDER_REC