Hi every body!
I would like collect package out parameter to dataset
c#
string sql = "CEGEK_PKG.OPENCURSOR";
OracleCommand command = new OracleCommand();
DataSet ds = new DataSet();
command.CommandText = sql;
oracleConnection1.Open();
command.Connection = oracleConnection1;
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add("EMPCURSOR",OracleDbType.Cursor).Direction = ParameterDirection.Output;
OracleDataAdapter adapter = new OracleDataAdapter(command);
adapter.TableMappings.Add("Table", "CEGEK");
adapter.Fill(ds);
this code not working:
ORA-06550: line 2, column 13:
PLS-00302: component 'OPENCURSOR' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
How can i solv this problem.Or there is any other method?
Thanks for your answer
Get package out to dataset
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
Please check whether you are able to execute the procedure with some standard tool, like SQL*Plus. If possible, please send us the definition of CEGEK_PKG.OPENCURSOR. I've tried your sample on a simple procedure that returns a cursor, and the data set was successfully filled.
As for other methods, you may be interested in Devart DataSet Wizard which allows to create typed DataSets using stored procedures:
http://www.devart.com/dotconnect/oracle ... izard.html
and in Package Wizard (Tools -> Oracle -> Oracle Package Wizard), with the help of which you may create typed OraclePackages.
As for other methods, you may be interested in Devart DataSet Wizard which allows to create typed DataSets using stored procedures:
http://www.devart.com/dotconnect/oracle ... izard.html
and in Package Wizard (Tools -> Oracle -> Oracle Package Wizard), with the help of which you may create typed OraclePackages.