惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LINUX DO - 热门话题
Stack Overflow Blog
Stack Overflow Blog
B
Blog
WordPress大学
WordPress大学
Project Zero
Project Zero
P
Palo Alto Networks Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 司徒正美
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
小众软件
小众软件
T
Tailwind CSS Blog
Forbes - Security
Forbes - Security
F
Full Disclosure
SecWiki News
SecWiki News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hacker News: Ask HN
Hacker News: Ask HN
C
Check Point Blog
Microsoft Security Blog
Microsoft Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
Cisco Talos Blog
Cisco Talos Blog
G
Google Developers Blog
J
Java Code Geeks
Google DeepMind News
Google DeepMind News
人人都是产品经理
人人都是产品经理
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
O
OpenAI News
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
V
Vulnerabilities – Threatpost
Y
Y Combinator Blog
IT之家
IT之家
U
Unit 42
腾讯CDC
S
Security Affairs
C
Cisco Blogs
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
B
Blog RSS Feed
宝玉的分享
宝玉的分享
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss

博客园 - CoolBug

准备做培训,欢迎大家来讨论 上海蜗牛招聘.NET程序员 博客园2007-10-27上海聚会 上海招聘.NET(C#)程序员 激情哪里去了II 上海蜗牛信息科技招聘.NET开发工程师 招人 SQL Server不存在或访问被拒绝 Windows里的一个bug 安装acdsee 3.1后出错 .net软件开发工程师简历 coolbug个人简历 Visual Studio 2005的应用问题,谁有解决方法 轻松配置自己的网络IP,网关,及DNS VS出错问题集锦 <<妮子>> 一些感动的日子 周末游山 相亲,再次相亲 周末--------粉红色的回忆 今夜微风轻送,把我的心吹动...
将数据库的存储过程及其参数导出来的方法
CoolBug · 2006-04-07 · via 博客园 - CoolBug

久学培训网--国内最大的培训平台!
免费发布课程,需求,查找课程,讲师,机构
培训课程:电脑,英语,日语,企业管理,职业,法语,软件,驾驶,口语,物流,厨师,网络,网络,美容,才艺,会计,股票,舞蹈
...

这两天需要将CCS里所有的存储过程导成表格的形式,拿出来分析。于是...
导出结果:

 


然后直接粘贴到Word文档里,就成了设计文档了,方便否?

web.config配置:

<add key="DSN" value="server = (local);database = ccs;uid=sa;pwd=***" />

代码,页面有一Label,ID为:lblStoreProcedure:

 1private void BindStoreProcedure()
 2            {
 3                string ConnString = System.Configuration.ConfigurationSettings.AppSettings["DSN"];
 4                SqlConnection conn = new SqlConnection(ConnString);
 5                DataSet ds = new  DataSet();
 6                SqlDataAdapter da = new SqlDataAdapter("SELECT   name,id FROM dbo.sysobjects WHERE (xtype = 'p') AND (LEFT(name, 2) <> 'dt')",conn);
 7                da.Fill(ds);
 8                
 9                for(int i =0 ;i<ds.Tables[0].Rows.Count;i++)
10                {
11                    this.lblStoreProcedure.Text +="<b>"+Convert.ToInt32(i+1).ToString()+""+ ds.Tables[0].Rows[i]["name"].ToString() + "<b><br>";
12                    this.lblStoreProcedure.Text +="<br><b>作者:</b>";
13                    this.lblStoreProcedure.Text +="<br><b>日期:</b>";
14                    this.lblStoreProcedure.Text +="<br><b>说明:</b>";
15                    this.lblStoreProcedure.Text +="<br><b>参数:</b>";
16                    this.lblStoreProcedure.Text += "<table border = '1' bordercolor='#4D4D4D' width = '600' cellpadding='0' cellspacing='0' >";
17                    this.lblStoreProcedure.Text +="<tr><td>参数</td><td>说明</td></tr>";
18                    DataSet ds2 =  GetDataSet(conn,ds.Tables[0].Rows[i]["id"].ToString());
19                    foreach(DataRow r in ds2.Tables[0].Rows)
20                    {
21                        this.lblStoreProcedure.Text += "<tr>";
22                        this.lblStoreProcedure.Text += "<td width='10%'>"+r["name"].ToString()+"</td>";
23                        this.lblStoreProcedure.Text += "<td>&nbsp</td>";
24                        this.lblStoreProcedure.Text += "</tr>";
25                    }

26                    this.lblStoreProcedure.Text += "</table><br>";
27
28                }

29            }

30        private DataSet GetDataSet(SqlConnection conn,string id)
31        {
32            
33            DataSet ds = new  DataSet();
34            SqlDataAdapter da = new SqlDataAdapter("SELECT  name from syscolumns where  id = "+id,conn); 
35            da.Fill(ds);
36            return ds;
37        }

不知道有没有人可以把 @参数后的注释能够取出来?我目前还没有发现。

阿里云优惠券领取地址:https://partner.aliyun.com/shop/35783975 ,需要更多优惠请联系QQ和微信:891115,热线:400-968-4968