﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>博客园-Artech-随笔分类-F. SQL Server</title><link>http://www.cnblogs.com/artech/category/87404.html</link><description>Develop every application as an art using the most suitable technologies!</description><language>zh-cn</language><lastBuildDate>Sat, 11 Oct 2008 06:07:32 GMT</lastBuildDate><pubDate>Sat, 11 Oct 2008 06:07:32 GMT</pubDate><ttl>60</ttl><item><title>[原创-总结]谈谈基于SQL Server 的Exception Handling</title><link>http://www.cnblogs.com/artech/archive/2008/08/28/1278580.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Thu, 28 Aug 2008 05:44:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2008/08/28/1278580.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/1278580.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2008/08/28/1278580.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/1278580.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/1278580.html</trackback:ping><description><![CDATA[摘要: 对于所有的开发人员来说，Exception Handling是我们每天都要面对的事情。对于基于Source Code的Exception Handling，我想大家已经司空见惯了，但是对于Database级别的Exception Handling，就没有那么常见了。在这篇文章中，我将会介绍我对于基于Database编程中Exception Handling的一些粗浅的认识：在编写Stored Procedure时，如何抛出一个可预知的Exception，ADO.NET如何处理从Database抛出的Exception，如何保存基于Database Exception的Error Message，如何在Database和.NET Application之间进行消息的传递[注：这里的Database主要指SQL Server]。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2008/08/28/1278580.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/1278580.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]谈谈基于SQL Server 的Exception Handling - PART III</title><link>http://www.cnblogs.com/artech/archive/2007/12/17/1002857.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 17 Dec 2007 04:53:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/12/17/1002857.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/1002857.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/12/17/1002857.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/1002857.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/1002857.html</trackback:ping><description><![CDATA[摘要: 在<a href="http://www.cnblogs.com/artech/archive/2007/12/17/997209.html" target="_blank">谈谈基于SQL Server 的Exception Handling - PART II</a>中，我给出了一个完整的例子说明了：如何在将message定义在sys.messages中保证message的一致性和可维护性；如何在Stored procedure中使用RAISERROR将一个可预知的Error抛出；如何在Stored procedure中使用TRY/CATCH进行异常的捕捉；在Application如果处理从SQL Server抛出的Exception。实际上，SQL Server database Engine抛出、被我们的.NET最终捕获的SqlException，我们通过SqlException的属性可以得到Error的相关信息。下面是SqlException的属性列表：&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/12/17/1002857.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/1002857.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]谈谈基于SQL Server 的Exception Handling - PART II</title><link>http://www.cnblogs.com/artech/archive/2007/12/17/997209.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 17 Dec 2007 04:41:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/12/17/997209.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/997209.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/12/17/997209.html#Feedback</comments><slash:comments>6</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/997209.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/997209.html</trackback:ping><description><![CDATA[摘要: 在<a href="http://www.cnblogs.com/artech/archive/2007/12/17/997182.html" target="_blank">上面一节</a>中，我通过RAISERROR重写了创建User的Stored procedure，实际上上面的Stored procedure是有问题的。我之所以没有立即指出，是因为这是一个很容易犯的错误，尤其是习惯了.NET Exception Handling的人更容易犯这样的错误。我们知道在.NET Application中，如果出现一个未处理的Exception，程序将立即终止，后续的程序将不会执行，但是对于上面的SQL则不一样，虽然我们通过RAISERROR将Error抛出，但是SQL的指定并不会被终止，INSERT语句仍然会被执行的。我想很多人会说在RAISERROR后加一个Return就可以了嘛。不错这是一个常用的解决方案，但是我不倾向于使用这种方法。为了更清楚地说明这个问题，我们举另一个相关的例子，上面我们介绍了创建User的例子，我们现在来引入另一个例子：如何将一个User添加到一个Role里面&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/12/17/997209.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/997209.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]谈谈基于SQL Server 的Exception Handling - PART I</title><link>http://www.cnblogs.com/artech/archive/2007/12/17/997182.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 17 Dec 2007 00:38:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/12/17/997182.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/997182.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/12/17/997182.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/997182.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/997182.html</trackback:ping><description><![CDATA[摘要: 对于所有的开发人员来说，Exception Handling是我们每天都要面对的事情。对于基于Source Code的Exception Handling，我想大家已经司空见惯了，但是对于Database级别的Exception Handling，就没有那么常见了。在这篇文章中，我将会介绍我对于基于Database编程中Exception Handling的一些粗浅的认识：在编写Stored Procedure时，如何抛出一个可预知的Exception，ADO.NET如何处理从Database抛出的Exception，如何保存基于Database Exception的Error Message，如何在Database和.NET Application之间进行消息的传递[注：这里的Database主要指SQL Server]。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/12/17/997182.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/997182.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]T-SQL Enhancement in SQL Server 2005 - Part II</title><link>http://www.cnblogs.com/artech/archive/2007/08/24/868956.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Fri, 24 Aug 2007 15:16:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/08/24/868956.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/868956.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/08/24/868956.html#Feedback</comments><slash:comments>17</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/868956.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/868956.html</trackback:ping><description><![CDATA[摘要: 在<a href="http://www.cnblogs.com/artech/archive/2007/08/23/867412.html" target="_blank">第一部分</a>中，我们讨论了<b>APPLY</b>和<b>CTE</b>这两个T-SQL Enhancement。APPLY实现了Table和TVF的Join，CTE通过创建“临时的View”的方式使问题化繁为简。现在我们接着来讨论另外两个重要的T-SQL Enhancement Items：<b>PIVOT</b>和<b>Ranking</b>。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/08/24/868956.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/868956.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]T-SQL Enhancement in SQL Server 2005 - Part I</title><link>http://www.cnblogs.com/artech/archive/2007/08/23/867412.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Thu, 23 Aug 2007 13:46:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/08/23/867412.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/867412.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/08/23/867412.html#Feedback</comments><slash:comments>20</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/867412.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/867412.html</trackback:ping><description><![CDATA[摘要: 较之前一版本，SQL Server 2005可以说是作出了根本性的革新。对于一般的编程人员来说，最具吸引力的一大特性就是实现了对CLR的寄宿，使我们可以使用任意一种.NET Programming Language来编写Stored Procedure、Function、Trigger、Custom Type等等。但是并不意味着我们使用多年的T-SQL即将被淘汰，而事实上T-SQL仍然是我们最为常见的基于Database的编程语言。 为了使编程人员更容易地使用T-SQL来实现一些较为复杂的功能，SQL Server 2005在T-SQL进行了一系列的改进，这篇文章将概括性地介绍这些T-SQL Enhancement。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/08/23/867412.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/867412.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我的ORM: 开发自己的Data Access Application Block - Part I</title><link>http://www.cnblogs.com/artech/archive/2007/04/03/698755.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Tue, 03 Apr 2007 10:55:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/04/03/698755.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/698755.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/04/03/698755.html#Feedback</comments><slash:comments>4</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/698755.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/698755.html</trackback:ping><description><![CDATA[摘要: 经常在网上看到对ORM的讨论沸沸扬扬，我也来凑个热闹，谈谈我写的一个ORM。最近在做一项工作，把我们经常用到的一些业务逻辑抽象出来，写成一个个的Application Block，使之可以运用到不同的Application中，比如Data Access，Messaging，Auditing，Data binding等等。现在先做一个Data access application block。由于时间仓促，没有进行什么优化和较多的测试，大家不必深究我所提供的Code ,我只希望为大家的ORM提供另一种想法。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/04/03/698755.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/698755.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]我的ORM: 开发自己的Data Access Application Block - Part II</title><link>http://www.cnblogs.com/artech/archive/2007/04/03/698762.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Tue, 03 Apr 2007 10:54:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/04/03/698762.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/698762.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/04/03/698762.html#Feedback</comments><slash:comments>8</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/698762.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/698762.html</trackback:ping><description><![CDATA[摘要: 经常在网上看到对ORM的讨论沸沸扬扬，我也来凑个热闹，谈谈我写的一个ORM。最近在做一项工作，把我们经常用到的一些业务逻辑抽象出来，写成一个个的Application Block，使之可以运用到不同的Application中，比如Data Access，Messaging，Auditing，Data binding等等。现在先做一个Data access application block。由于时间仓促，没有进行什么优化和较多的测试，大家不必深究我所提供的Code ,我只希望为大家的ORM提供另一种想法。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/04/03/698762.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/698762.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]SQL Server 2005：一个使用新创建的User的问题和解决方法</title><link>http://www.cnblogs.com/artech/archive/2007/03/26/689100.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Mon, 26 Mar 2007 13:51:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/26/689100.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/689100.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/26/689100.html#Feedback</comments><slash:comments>9</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/689100.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/689100.html</trackback:ping><description><![CDATA[摘要: 昨天在写一个SQLXML的Sample的时候，在SQL Server 2005添加新的User的时候出了一系列的问题，觉得这是一个很Common的问题，今天我把它重现，并把相关的Screen Shot截下来，希望大家在遇到相同的问题的时候能对大家有所帮助。&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/26/689100.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/689100.html?type=1" width = "1" height = "1" />]]></description></item><item><title>[原创]SQLXML系列之一：SQLXML初体验——用XML代替SQL来操作数据库</title><link>http://www.cnblogs.com/artech/archive/2007/03/26/687769.html</link><dc:creator>Artech</dc:creator><author>Artech</author><pubDate>Sun, 25 Mar 2007 18:59:00 GMT</pubDate><guid>http://www.cnblogs.com/artech/archive/2007/03/26/687769.html</guid><wfw:comment>http://www.cnblogs.com/artech/comments/687769.html</wfw:comment><comments>http://www.cnblogs.com/artech/archive/2007/03/26/687769.html#Feedback</comments><slash:comments>29</slash:comments><wfw:commentRss>http://www.cnblogs.com/artech/comments/commentRss/687769.html</wfw:commentRss><trackback:ping>http://www.cnblogs.com/artech/services/trackbacks/687769.html</trackback:ping><description><![CDATA[摘要: 随着Internet的飞速发展，W3C成员意识到必须找到一种办法将数据和Web的表现方式分离出来，于是XML诞生了。当今的XML已经成为IT领域各个数据（特别是文档）的首选格式。由于它具有标记不同字段的能力，因此使搜索变得更简单。从微软发布SQL Server 2000的时候，就读XML数据的存储和检索提供内置的支持。而且微软早已意识到必须对其不断地改进，以便和不断发展的W3C的XML标准保持一致。在微软发布SQL Server 2000的几个月之后，它便在Web站点上发布了完全可以支持XML特性的软件包提供免费的下载。这些软件包被称作SQLXML（XML for SQL Server），当时的版本是3.0。5年之后，SQL Server 升级到了SQL Server 2005，提供了一系列的新的功能和特性，比如对新的XML数据类型的支持；提供了新的Data Access Provider——Native Client；等等。为了提供对这个新的功能的支持，和对原来版本的改进，SQLXML4.0被推出来。SQLXML4.0已经成为了一种成熟的数据访问技术.&nbsp;&nbsp;<a href='http://www.cnblogs.com/artech/archive/2007/03/26/687769.html'>阅读全文</a><img src ="http://www.cnblogs.com/artech/aggbug/687769.html?type=1" width = "1" height = "1" />]]></description></item></channel></rss>