G
Guest
Hi,
I'm using the Enterprise Library June 2005 - Data Access Application Block
(DAAB) to connect to Oracle 9i Database.
When I try to ExecuteDataset method with a stored procedure that returns a
cursor I got an error.
This is VB.NET code:
------------------------------------- VB.NET CODE
----------------------------------------
Dim dbCmdWrapper As DBCommandWrapper =
dbPMRORA.GetStoredProcCommandWrapper("APP.GetList")
dbCmdWrapper.AddOutParameter("p_cursor", OracleType.Cursor, 0)
Dim dsCandidates As DataSet = Nothing
dsCandidates = dbPMRORA.ExecuteDataSet(dbCmdWrapper)
'~~~~~~~~~ Also Tryed this for the parameter ~~~~~~~~~~~~~~
'dbCmdWrapper.AddOutParameter("p_cursor", OracleType.Cursor, 2000)
'dbCmdWrapper.AddOutParameter("p_cursor", DBType.Object,2000)
'---------------------------- End VB.NET Code
-------------------------------------------
So I tried to call the oracle stored procedure using different parameters
and without adding the parameter but none of the method works and I got the
following error:
------------------------ Error Message
-------------------------------------------------
[OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GETLIST'
------------------------ Error Message
-------------------------------------------------
This the the oracle stored procedure
------------------------ Oracle Package
------------------------------------------------
Create or Replace PACKAGE APP
IS
TYPE t_generic_cursor IS REF CURSOR;
PROCEDURE getList(
p_cursor OUT t_generic_cursor
);
END;
/
Create or Replace PACKAGE BODY APP
IS
PROCEDURE getList(
p_cursor OUT t_generic_cursor
)
IS
v_sql VARCHAR2(2000);
BEGIN
v_sql := 'Select * From tbCandidate';
-- Open the ref cursor
OPEN p_cursor FOR v_sql;
END ;
END app;
------------------------ Oracle Package
I'm using the Enterprise Library June 2005 - Data Access Application Block
(DAAB) to connect to Oracle 9i Database.
When I try to ExecuteDataset method with a stored procedure that returns a
cursor I got an error.
This is VB.NET code:
------------------------------------- VB.NET CODE
----------------------------------------
Dim dbCmdWrapper As DBCommandWrapper =
dbPMRORA.GetStoredProcCommandWrapper("APP.GetList")
dbCmdWrapper.AddOutParameter("p_cursor", OracleType.Cursor, 0)
Dim dsCandidates As DataSet = Nothing
dsCandidates = dbPMRORA.ExecuteDataSet(dbCmdWrapper)
'~~~~~~~~~ Also Tryed this for the parameter ~~~~~~~~~~~~~~
'dbCmdWrapper.AddOutParameter("p_cursor", OracleType.Cursor, 2000)
'dbCmdWrapper.AddOutParameter("p_cursor", DBType.Object,2000)
'---------------------------- End VB.NET Code
-------------------------------------------
So I tried to call the oracle stored procedure using different parameters
and without adding the parameter but none of the method works and I got the
following error:
------------------------ Error Message
-------------------------------------------------
[OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GETLIST'
------------------------ Error Message
-------------------------------------------------
This the the oracle stored procedure
------------------------ Oracle Package
------------------------------------------------
Create or Replace PACKAGE APP
IS
TYPE t_generic_cursor IS REF CURSOR;
PROCEDURE getList(
p_cursor OUT t_generic_cursor
);
END;
/
Create or Replace PACKAGE BODY APP
IS
PROCEDURE getList(
p_cursor OUT t_generic_cursor
)
IS
v_sql VARCHAR2(2000);
BEGIN
v_sql := 'Select * From tbCandidate';
-- Open the ref cursor
OPEN p_cursor FOR v_sql;
END ;
END app;
------------------------ Oracle Package