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!

Calling Stored Procedures using ODP for .NET

227815Jul 19 2002
I am trying to run the code below. I get an ORA 06550 error, stating 'wrong number or types of arguments'

C# Code
OraConnection con = new OraConnection(constr);
con.Open();

OraCommand cmd = new OraCommand();
cmd.Connection = con;
cmd.CommandText = "davidbovelltest.getpropnp";
cmd.CommandType = CommandType.StoredProcedure;

// Create the OraDataAdapter
OraDataAdapter da = new OraDataAdapter(cmd);
// Populate a DataSet
DataSet ds = new DataSet();
da.SelectCommand.ExecuteReader(CommandBehavior.CloseConnection);
da.Fill(ds);

Stored Procedure
procedure GetPropnp( c_return out pc_return) is

begin
open c_return for
select property.prop_num,
property.prop_name,
property.street_name,
property.addr_line2,
property_type.descr,
property.build_date
from property,
property_type
where property.uprn = 313
and property.property_type_code = property_type.code;

end;

Please help

Comments

170397
You need to bind the command parameter to the SP out ref cursor parameter.
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Aug 16 2002
Added on Jul 19 2002
1 comment
243 views