Calling Stored Procedures using ODP for .NET — oracle-tech

    Forum Stats

  • 3,715,830 Users
  • 2,242,890 Discussions
  • 7,845,632 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Calling Stored Procedures using ODP for .NET

227815
227815 Member Posts: 1
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

This discussion has been closed.