Listing Database Store Procedurs using C# ADO.Net

Introduction

Listing all the available store procedures of database using ado.net i very easy, see the bellow code for more clerification.

SqlConnection connection = new SqlConnection("ConnectionString");

connection.Open();
SqlCommand command = new SqlCommand("select name as TableName,create_date from sys.procedures", connection);

SqlDataAdapter adapter = new SqlDataAdapter(command);

DataTable dataTable = new DataTable();

adapter.Fill(dataTable);


Above code lists store procedure name and created date
Ebook Download
View all
Learn
View all