Oracle cursor problem using DAAB Stored Procedure
- From: "DSISupport" <DSISupport@xxxxxxxxxxxxxxxx>
- Date: Thu, 20 Oct 2005 05:58:03 -0700
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
------------------------------------------------
Please let me know if you have any suggestions.
Thank in advance.
.
- Follow-Ups:
- RE: Oracle cursor problem using DAAB Stored Procedure
- From: "Peter Huang" [MSFT]
- RE: Oracle cursor problem using DAAB Stored Procedure
- Prev by Date: Re: How to convert any local time to UTC
- Next by Date: Assembly versioning
- Previous by thread: RE: Microsoft enterprise library and Oracle
- Next by thread: RE: Oracle cursor problem using DAAB Stored Procedure
- Index(es):
Relevant Pages
|