List of Stored Procedures

List of Stored Procedures

Postby TheDotNetSystem » Mon 20 Sep 2010 08:32

Hi !

Is there a way, to get a List of my Stored Procedures?
TheDotNetSystem
 
Posts: 1
Joined: Mon 20 Sep 2010 08:30

Postby 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;";
    conn.Open();
    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.
Shalex
Devart Team
 
Posts: 7654
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for Oracle