La stored Procedure č questa:
CREATE OR REPLACE PACKAGE types
AS
TYPE ref_cursor IS REF CURSOR;
END;
create or replace function ACCEDISUBAC(p_codist in char,p_proc in char,p_fil in char,p_cat in char,p_nrap in number) Return types.ref_cursor
as p_cursor types.ref_cursor;
begin
OPEN p_cursor FOR
SELECT * from T_WSGA_SUBAC
WHERE CODIST=p_codist
AND PROC=p_proc
AND FIL=p_fil
AND CAT=p_cat
AND NRAP=p_nrap;
return(p_cursor);
end ACCEDISUBAC;
e il codice Java dove faccio la Call alla procedura č :
String sqlCommand = "{? = call "+storedprocedure+"(?,?,?,?,?)}";
CallableStatement cs = null;
cs = conn.prepareCall(sqlCommand);
cs.registerOutParameter(1,OracleTypes.CURSOR);
cs.setString(2,p_codist);
cs.setString(3,p_proc);
cs.setString(4,p_fil);
cs.setString(5,p_cat);
cs.setInt(6,p_nrap);
boolean exe = cs.execute();
ResultSet rs = cs.executeQuery();
Mi dā un errore in esecuzione di NullPoint (ho qualcosa del genere)![]()
Chi mi sā dire dovč il problema