我有一个程序,我想阅读程序的架构.要检索视图模式,我使用此处显示的查询.同样的方式我想获得存储过程的模式.怎么弄?Plz显示了一些语法.
public static DataTable SchemaReader(string tableName)
{
string sql = string.Format("Select * from {0}", tableName);
conn.Open();
SqlCommand cmd = new SqlCommand(sql, conn);
cmd.CommandType = CommandType.Text;
SqlDataReader reader = cmd.ExecuteReader();
DataTable schema = reader.GetSchemaTable();
reader.Close();
conn.Close();
return schema;
}
Run Code Online (Sandbox Code Playgroud)
如果有任何查询请问.请提前谢谢.