From C# Code, I'm trying to call a PACKAGE.PROCEDURE() from Oracle. In this simple example I should get one value from the procedure call, but all I get is error:
> wrong number or types of arguments in call to 'RETURN_NUM'
The procedure is declared as follows:
- PROCEDURE return_num(xNum OUT NUMBER) AS
- BEGIN
- xNum:= 50;
- dbms_output.put_line('hello world ' || xNum);
- END;
C# code:
- Oraclecon.Open();
- OleDbCommand myCMD = new OleDbCommand("TEST.return_num", Oraclecon);
- myCMD.CommandType = CommandType.StoredProcedure;
- myCMD.Parameters.Add("xNum", OleDbType.Numeric);
- OleDbDataReader myReader;
- myReader = myCMD.ExecuteReader();
Can some one please point out what I'm doing wrong. Then in a real scenario I would like to call a procedure that returns a set of values from a custom Type, such as:
- TYPE r_interface_data IS RECORD
- (
- object_id VARCHAR2(16),
- obj_type VARCHAR2(32)
- );
- TYPE t_interfase_data IS TABLE OF r_interface_data;
How can I approach that. Thanks!