All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
c#中GDI+图形图像:GDI+中曲线的填充使用方法
Asp.Net,Ajax,学习笔记14,扩展Microsoft,AJAX,Library的异步通信层_[Asp.Net教程]
ASP.NET(C#)经典采集代码_[Asp.Net教程]
数据库方面总结_mssql学习_编程技术
javascript网页特效:闪现的礼花背景_JavaScript技术_编程技术
visual c++ MFC调试宏
在ASP.NET中利用VWD操作数据库简介_[Asp.Net教程]
不使用VS进行ASP.NET,Membership管理_[Asp.Net教程]
SQL,Server数据库性能优化_[SQL,Server教程]
SQL中CASE使用_mssql学习_编程技术
Reading number is top 10 pictures
Photographed the passion of the clients and prostitutes in the sex trade picture2
China's ambassador to Libya embassy was shock, and the glass is broken in
Magnificent cloud2
So beauty, will let you spray blood1
真正的国产-非模拍 贵在是真实2
photos of ashlynn brooke(ashlynn brooke的美图)
The real super beauty5
机器人也有性生活吗?
Li Zongrui hunting video screenshots2
2012 national geographic daily picture6
Download software ranking
Unix video tutorial4
Rio big adventure
Tram sex maniac 2 (H) rar bag12
Desire a peach blossom
The Bermuda triangle3
Popkart Cracked versions Mobile phone games
致我们终将逝去的青春
jBuilder2006
The Bermuda triangle2
Eclipse 4.2.2 For Win32
aaa published in(发表于) 2013/12/11 8:29:11 Edit(编辑)
ASP.NET技巧:存储过程的分析_.net资料_编程技术

ASP.NET技巧:存储过程的分析_.net资料_编程技术

ASP.NET技巧:存储过程的分析_.net资料_编程技术-你的首页-uuhomepage.com
1 // 对存储过程的分析:实例
2 // string G_name ,string G_password为传递给此存储过程的参数,string Loging表示方法名和类型
3
4 public string Login( string G_Name , string G_Passord)
5 {
6
7 SqlConnection Conn = new SqlConnection(ConfigurationSettings.AppeSettings[ " ConnectionString " ]);
8 // 此为连接语句
9 /**/ /*
10 ConfigurationSettings.AppeSettings["ConnectionString"]
11 表示从Configurantion加载了一条连接语句
12 Config里的语句为
13
14
15

16
17 注意此标是放在的上面
18 */
19 SqlCommand Comm = new SqlCommand( " Login " ,Conn);
20 // 新建一个SqlCommand的实例Comm并把它标记为储蓄过程名为Login。
21
22 Comm.CommandType = CommandType.StoredProcedure;
23 // 将Comm标记为储蓄过程
24
25
26
27 // 下面为存储过程添加参数
28 SqlParameter parameterG_name = new SqlParameter( " @G_name " ,SqlDbType.NVarChar, 20 );
29 // 新建了一个SqlParameter的储蓄过程参数实例:实例名为pranmeterG_name
30 // 并定义了一个名为"@G_name"的参数名,定义类型SqlDbType为NvarChar 字节数为20;
31
32 parameterG_name.Value = G_Name;
33 // 为参数实例parameterG_name赋值 为这个值是从方法Login中传递进来的值
34 // 注意parameterG_name.Value=G_name 中的G_name和语句new SqlParameter("@G_name",SqlDbType.NVarChar,20);
35 // 中的@G_name是不同,@G_name是为一个SqlParameter的储蓄过程定义的一个参数名
36
37 Comm.Parameters.Add(prarameterG_name);
38 // 为Comm为添加参数paratemterG_name
39
40
41
42
43 SqlParameter parameterG_password = new SqlParameter( " @G_password " ,SqlDbType.NVarChar, 20 );
44 parameterG_password.Value = G_password;
45 Comm.Parameters.Add(parameterG_password);
46
47 SqlParameter parameterG_Id = new SqlParameter( " @G_Id " ,SqlDbType.Int, 4 );
48 parameterG_Id.Direction = ParameterDirection.Output;
49 // parameterG_Id.dDirection 获取或者设置一个值,该值指示指示参数是只可
50   // 只可以输入,只可以输出,双向 还是存储过程返回值参数
51 // ParameterDirection.Output;定义了此参数为输出参数
52 Comm.Parameters.Add(paramerG_Id);
53
54 // 打开连接并执行Command命令
55 Conn.Open();
56 Comm.ExecuteNonQuery();
57 Conn.Close();
58
59 // 对获得parameterG_Id.Value的值进行处理
60 int G_id = ( int )(parameterG_Id.Value);
61
62 if (G_id == 0 )
63 {
64 return null ;
65 // 返回空
66 }
67 else
68 {
69 G_id.ToString();
70 // 将此信息转换为等效字符串的表现形势
71 }




添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.