tenho a seguinte function no banco oracle
CREATE OR REPLACE FUNCTION sp_get_stocks(v_price IN NUMBER)
RETURN types.ref_cursor
AS
stock_cursor types.ref_cursor;
BEGIN
OPEN stock_cursor FOR
SELECT ric,price,updated FROM stock_prices
WHERE price < v_price;
RETURN stock_cursor;
END;
e na minha classe java:
String call = " { ? = call sp_get_stocks(?) }";
CallableStatement stmt = conn.prepareCall(call);
stmt.registerOutParameter(1, OracleTypes.CURSOR);
stmt.setFloat(2, 50);
stmt.execute();
ResultSet rs = (ResultSet)stmt.getObject(1);
while (rs.next()) {
System.out.println(rs.getString("RIC"));
}
mas da dando a seguinte excecao:
java.sql.SQLException: Tamanho de tipo maior que o Máximo
ai ferra… nun consigo identificar o q possa ser…
o erro ta acontecendo na instrucao “stmt.execute()”
alguem tem ideia?