-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: shailaja
Message 1 in Discussion

 
Hi All,
I want to use stored procedure returning cursor in my C# application.
Database used is oracle 9i.
I tried the this way , still error persists.
My stored Procedure is in package "PKG_GET_PROCESSING_AREA"
I am using "System.Data.OleDb" as a provider

PROCEDURE SP_GET_PROCESSING_AREA (P_GUID IN VARCHAR2, P_REVISION IN
VARCHAR2, P_VERSION IN VARCHAR2, P_RC OUT PKG_UTIL.refC) IS

BEGIN

OPEN P_RC FOR select * FROM PROCESSING_AREA_T

where TRIM(GUID) = TRIM(P_GUID) AND

TRIM(REVISION) = TRIM(P_REVISION) AND

TRIM(VERSION) = TRIM(P_VERSION)

ORDER BY GUID;

END SP_GET_PROCESSING_AREA;

Dotnet code is

OleDbCommand CMD_SP_GET_PROCESSING_AREA = new
OleDbCommand("PKG_GET_PROCESSING_AREA.SP_GET_PROCESSING_AREA",
this.ConnectionFIM);

CMD_SP_GET_PROCESSING_AREA.CommandType =CommandType.StoredProcedure;

CMD_SP_GET_PROCESSING_AREA .Parameters.Add("@P_GUID",
OleDbType.VarChar).Value = tempPA.LatestSavedVersion.ID;

CMD_SP_GET_PROCESSING_AREA.Parameters[0].Direction =
ParameterDirection.Input;

CMD_SP_GET_PROCESSING_AREA .Parameters.Add("@P_REVISION",
OleDbType.VarChar).Value = tempPA.LatestSavedVersion.Revision;

CMD_SP_GET_PROCESSING_AREA.Parameters[1].Direction =
ParameterDirection.Input;

CMD_SP_GET_PROCESSING_AREA .Parameters.Add("@P_VERSION",
OleDbType.VarChar).Value = tempPA.LatestSavedVersion.Version;

CMD_SP_GET_PROCESSING_AREA.Parameters[2].Direction =
ParameterDirection.Input;

ConnectionFIM.Open();

System.Data.OleDb.OleDbDataReader GetRow =
CMD_SP_GET_PROCESSING_AREA.ExecuteReader();

----------------------------------------------------------------------------
-----------------------------------

When the above code is executed I am getting exception in stored procedure
invalid number/type of arguments passed.

Can anyone please help me out figuring what might be going wrong?

Thanks &Regards

Shailaja

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to