I must call this function PS/SQL :
FUNCTION get_referente (tiporef IN number,impridref IN number, perrorcode
OUT NUMBER)
RETURN requicur IS
wrk_cursor requicur;
--
BEGIN
--
perrorcode := 0;
--
OPEN wrk_cursor FOR
SELECT NOME, COGNOME, RECAPITO
FROM REFERENTE
WHERE IMPRID=impridref AND TIPO = tiporef;
RETURN wrk_cursor;
--
EXCEPTION
WHEN OTHERS THEN perrorcode := SQLCODE;
END get_referente;

I use this code :


OleDbConnection oOleDbConnection =new OleDbConnection();
String sConnString ="Provider=OraOLEDB.Oracle;Data
Source=xxxxxx;User ID=asterif;Password=asterif";
oOleDbConnection = new OleDbConnection(sConnString);
OleDbDataAdapter myCommand =new
OleDbDataAdapter("ui.get_referente",oOleDbConnection);
myCommand.SelectCommand.CommandType = CommandType.StoredProcedure;
myCommand.SelectCommand.Parameters.Add("tiporef",DbType.VarNumeric);
myCommand.SelectCommand.Parameters["tiporef"].Direction=ParameterDirection.Input;
myCommand.SelectCommand.Parameters.Add("impridref",DbType.VarNumeric);
myCommand.SelectCommand.Parameters["impridref"].Direction=ParameterDirection.Input;
myCommand.SelectCommand.Parameters.Add("perrorcode",DbType.VarNumeric);
myCommand.SelectCommand.Parameters["perrorcode"].Direction=ParameterDirection.Input;
DataSet ds=new DataSet();
myCommand.Fill (ds,"Dataset");

But the fill method raise error.
How can i define a return value of function (Cursor type) ?

Thanks