Is there a way to get stored procedures from a SQL Server 2005 Express database using C#? I would like to export all of this data in the same manner that you can script it o
You can use:
DataTable dtProcs = sqlConn.GetSchema("Procedures", new string[] { databaseName });
DataTable dtProcParams = sqlConn.GetSchema("ProcedureParameters", new string[] { databaseName });
You can also get all sorts of other schema info like tables, indexes etc. if you need them.
You can get info on GetSchema() here and info on the SQL Server Schema Collections here
Edit: Sorry, this doesn't help with actually scripting the info, but I guess it's useful info to have.