Returning UDT (Oracle Object) from a procedure to C#
Hi,
I have defined an object in the database and am returning that in a pl/sql procedure back to my webapp written C# using odp.net (11.1.0.7). I have created a custom class for the object so I can pass the object in my C# code. The call to pl/sql works fine and it returns the object. However I do not know how to assign that to my C# object so that my C# object gets populated.
Here is what I am trying to do.
OracleConnection conn = new OracleConnection();
conn.ConnectionString = "Data Source=(tns_entry);User ID=APP;Password=pwd";
using (OracleCommand cmd = new OracleCommand("package.proc_name", conn)) {
cmd.Parameters.Add("p_test_obj", OracleDbType.Object).Direction = ParameterDirection.Output;
conn.Open();
cmd.ExecuteNonQuery();
TEST_OBJ test = cmd.Parameters["p_test_obj"]; ?????????????? (need to populate the object that is returned in the pl/sql call
}
Can someone tell me how to do this.
Thanks for the help