S
ssp
Hello there,
I am trying to do very simple thing in trying to return results from an
Oracle (10g) Stored Procedure using the Enterprise Library June 2005
Version.
The stored procedure first:
============================================
CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor OUT
SelectPackage.SelectCursor)
as
begin
open p_cursor for select * from sa.agency;
end AGENCYSELECTALL;
/
============================================
The cursor is defined in a package called SelectPackage as
===========================================
CREATE OR REPLACE PACKAGE SelectPackage AS
TYPE SelectCursor IS REF CURSOR;
END SelectPackage;
/
============================================
The code for executing the stored procedure looks a like this:
============================================
public AgencyEntityCollection SelectAll()
{
DBCommandWrapper dbCommandWrapper =
this.Db.GetStoredProcCommandWrapper("AGENCYSELECTALL");
OracleParameter prms = new OracleParameter();
prms = new OracleParameter("P_CURSOR", OracleType.Cursor, 30000,
ParameterDirection.Output, Convert.ToBoolean(1), 0, 0, "",
DataRowVersion.Default, null);
dbCommandWrapper.AddOutParameter(prms.ParameterName, prms.DbType,
prms.Size);
return
(AgencyEntityCollection)this.ExecuteSPMultiple(typeof(AgencyEntityCollection),
typeof(AgencyEntity), dbCommandWrapper);
}
============================================
Now, everytime I run this, I get the error:
============================================
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'AGENCYSELECTALL'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
============================================
Could anyone shed some light, as to what I maybe doing wrong?
Thanks
I am trying to do very simple thing in trying to return results from an
Oracle (10g) Stored Procedure using the Enterprise Library June 2005
Version.
The stored procedure first:
============================================
CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor OUT
SelectPackage.SelectCursor)
as
begin
open p_cursor for select * from sa.agency;
end AGENCYSELECTALL;
/
============================================
The cursor is defined in a package called SelectPackage as
===========================================
CREATE OR REPLACE PACKAGE SelectPackage AS
TYPE SelectCursor IS REF CURSOR;
END SelectPackage;
/
============================================
The code for executing the stored procedure looks a like this:
============================================
public AgencyEntityCollection SelectAll()
{
DBCommandWrapper dbCommandWrapper =
this.Db.GetStoredProcCommandWrapper("AGENCYSELECTALL");
OracleParameter prms = new OracleParameter();
prms = new OracleParameter("P_CURSOR", OracleType.Cursor, 30000,
ParameterDirection.Output, Convert.ToBoolean(1), 0, 0, "",
DataRowVersion.Default, null);
dbCommandWrapper.AddOutParameter(prms.ParameterName, prms.DbType,
prms.Size);
return
(AgencyEntityCollection)this.ExecuteSPMultiple(typeof(AgencyEntityCollection),
typeof(AgencyEntity), dbCommandWrapper);
}
============================================
Now, everytime I run this, I get the error:
============================================
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'AGENCYSELECTALL'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
============================================
Could anyone shed some light, as to what I maybe doing wrong?
Thanks