- 1、本文档共48页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
zy02-2011 ADO.NET-02-字符串加密.pptx
ADO.NET-02-字符串加密;多种方式;编码加密;使用工具加密;自行加密;public static void SetConfigValue(string AppKey, string AppValue)
{
XmlDocument xDoc = new XmlDocument();
//获取可执行文件的路径和名称
string path = System.Windows.Forms.Application.ExecutablePath + .config;
xDoc.Load(path);
XmlNode xNode;
XmlElement xElem1;
XmlElement xElem2;
xNode = xDoc.SelectSingleNode(//connectionStrings);
xElem1 = (XmlElement)xNode.SelectSingleNode(//add [@name= + AppKey + ]);
if (xElem1 != null) xElem1.SetAttribute(connectionString, AppValue);
xDoc.Save(System.Windows.Forms.Application.ExecutablePath + .config);
};SQL身份验证;连接池 ;连接池(续) ;连接池(续) ;连接池;异常处理;异常处理;为什么需要事务;什么是事务;事务的特性;MultipleActiveResultSets=true;(第三课中的MARS)
theTransaction = theConnection.BeginTransaction(myFirstTransaction);
theCommand.CommandText = UPDATE product SET listprice = 59.99
WHERE productid = 2020;
theCommand.Transaction = theTransaction;
theCommand.ExecuteNonQuery();
theSecondCommand.CommandText =
INSERT INTO product (ProductName, ProductDescription, ListPrice,
ProductTypeID, ReleaseDate, ListPriceCurrency) +
VALUES (Super Fight 2, The sequel to the #1 XBox 360 game
that never was, 59.99, 1, 2008-11-01, USD);
theSecondCommand.Transaction = theTransaction;
theSecondCommand.ExecuteNonQuery();
theTransaction.Commit();
Console.WriteLine(Transaction committed.);;单元测试P38;第二课 数据提供程序与较复杂连接场景Using Data Providers and More Complex Connection Scenarios;DbProviderFactory theFactory = DbProviderFactories.GetFactory
(System.Data.SqlClient);
DbConnection theConnection = theFactory.CreateConnection();
theConnection.ConnectionString
您可能关注的文档
- 【精品】fanwen1.pptx
- 【精品】fanyi.pptx
- 【精品】New-SHL-core-deck-Jun8-2012FinalVersion-13_new.pptx
- 【精品】Note to All classes Mar 2012.pptx
- 【精品】Period 10 Listening and speaking strategies.pptx
- 【精品】shanghai city plan 2012- All v5.pptx
- 【精品】年终工作总结、培训模板@幻灯片精选.ppt
- 【精品】心理学视角下的设计@幻灯片精选.pptx
- 【绝版】【精】瑞金麟客服管理培训课件.pptx
- 【绝密!凡客体是这样来的!】凡客诚品 微博营销实践暨品牌创新设计案.pptx
文档评论(0)