List of Stored Procedures

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Posts: 1
Joined: Mon 20 Sep 2010 08:30

List of Stored Procedures

Post by TheDotNetSystem » Mon 20 Sep 2010 08:32

Hi !

Is there a way, to get a List of my Stored Procedures?

Site Admin
Posts: 8595
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 21 Sep 2010 08:23

Please use the OracleConnection.GetSchema() method to return System.Data.DataTable object with information about the server elements. The following sample shows a possible usage of the Procedures collection:

Code: Select all

using (OracleConnection conn = new OracleConnection())
    conn.ConnectionString = "server=ora1110;uid=scott;pwd=tiger;";
    DataTable table = conn.GetSchema("Procedures");
    DataTable table2 = conn.GetSchema("Procedures", new string[] { "schema_name" });
    DataTable table3 = conn.GetSchema("Procedures", new string[] { "schema_name", "package_name" });
    DataTable table4 = conn.GetSchema("Procedures", new string[] { "schema_name", "package_name", "procedure_name"});
For more information, please refer to the Retrieving Metadata article.

Post Reply