protected virtual void BindOutputParameter(AbstractDbParameter parameter, int parameterIndex) { parameter.Validate(); int jdbcType = (int)parameter.JdbcType; // java parameters are 1 based, while .net are 0 based parameterIndex++; CallableStatement callableStatement = ((CallableStatement)_statement); // the scale has a meening only in DECIMAL and NUMERIC parameters if (jdbcType == Types.DECIMAL || jdbcType == Types.NUMERIC) { if(parameter.DbType == DbType.Currency) { callableStatement.registerOutParameter(parameterIndex, jdbcType, 4); } else { callableStatement.registerOutParameter(parameterIndex, jdbcType, parameter.Scale); } } else { callableStatement.registerOutParameter(parameterIndex, jdbcType); } }
protected override void BindOutputParameter(AbstractDbParameter parameter, int parameterIndex) { CallableStatement callableStatement = ((CallableStatement)Statement); if (((OleDbParameter)parameter).IsOracleRefCursor) { callableStatement.registerOutParameter(++parameterIndex, _oracleRefCursor); } else { base.BindOutputParameter(parameter, parameterIndex); } }