Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

can some tell me how to call cursor by using enterprise library

584215Jun 20 2007 — edited Jun 21 2007
hi,

i just used the code thats posted by kalk and i am using enterprise library 2006 jan version.but still i get the same error as reported by kalk. can any one of you help me with it?

CODE Posted by kalk

Hi,

I have one procedure in Oracle which is returning the REF Cursor I am accessing it by using the Data access application block DAAB like the following:

OracleParameter param = new OracleParameter();

param.ParameterName = "Emp_Cursor";

param.OracleType = OracleType.Cursor;

param.Direction = ParameterDirection.Output;

param.Size = 3000;

Database db = DatabaseFactory.CreateDatabase("DBConnection");

//DbCommand cmd = db.GetSqlStringCommand("Select * from emp");

DbCommand cmd = db.GetStoredProcCommand("emppackage.select_employee");

db.AddOutParameter(cmd, param.ParameterName, param.DbType, param.Size);

DataSet ds = new DataSet();

ds = db.ExecuteDataSet(cmd);

GridView1.DataSource = ds;

GridView1.DataBind();

But iam getting this error:

ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SELECT_EMPLOYEE'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2007
Added on Jun 20 2007
2 comments
1,160 views