public void TestReturnProcedureWithReturnValue() { OracleConnection con = new OracleConnection(); con.ConnectionString = ConnectionString; OracleCommand cmd = new OracleCommand(); cmd.CommandText = "sp_pro9"; cmd.CommandType = System.Data.CommandType.StoredProcedure; cmd.Connection = con; cmd.Parameters.Add(new OracleParameter("spNo", 10)); OracleParameter cursor = new OracleParameter(); cursor.ParameterName = "p_cursor"; cursor.OracleType = OracleType.Cursor; cursor.Direction = System.Data.ParameterDirection.Output; cmd.Parameters.Add(cursor); try { con.Open(); cmd.ExecuteScalar(); } catch (Exception e) { } finally { con.Close(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)