Posts Tagged ‘snippet’
Passing “Order By” parameters w/o utilizing dynamic sql
Thursday, May 14, 2009 8:10 No CommentsSimilar to the SELECT and WHERE clauses, the ORDER BY clause can also utilize CASE statements. Within these CASE statements, the input parameter is evaluated and used to sort the result set as desired. For example, if you have a table with the following schema: 1: CREATE TABLE [CONTACT_TX_TB] ( 2: [CONTACT_SYSID] [int] IDENTITY(1,1) NOT [...]
Enabling SQL Cache Dependency within your .Net Application
Thursday, November 6, 2008 14:11 No CommentsThis one’s short and sweet … add the following snippet to your web.config file (within the configuration > system.web > pages node): 1: <caching> 2: <sqlCacheDependency enabled="true"/> 3: </caching> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier New”, courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode [...]
Recursive Queries in SQL Server 2005 using CTE
Thursday, November 6, 2008 11:58 No CommentsCommon table expressions (CTEs) provide the significant advantage of being able to reference themselves, making recursion far simpler then earlier versions of SQL Server. CTEs consist of three parts: a name, an optional column list and a query. A recursive query also consists of three parts: an anchor member, a recursive member and a termination [...]
Fixed Positions in IE6
Wednesday, November 5, 2008 12:06 No Commentsokay, so your happy coding in css compliant world and then you remember … IE is not css compliant … but you’ve just written some code utilizing the "position: fixed;" property and value … you check IE 7 … all good … then IE 6 … rut roh raggy … enter conditional comments … yea [...]
SQL Server Service Broker
Thursday, October 16, 2008 7:52 No CommentsThere exists a new feature in Microsoft SQL Server 2005 called Service Broker. With Service Broker, internal or external processes can send and receive guaranteed, asynchronous messaging by using extensions to Transact-SQL. Read More One way to utilize this feature is by implementing SQLCacheDependency within a SqlSiteMapProvider. Thus allowing the SqlSiteMapProvider to update as changes [...]
Recursive Queries in SQL Server 2005
Thursday, September 18, 2008 15:34 No Commentsamong other improvements, SQL Server 2005 included a new XML datatype and enhanced XML functions … thus providing another solution for recursive queries … for example … if i want to get a list of all of the tables in my database with their associated columns … i might write the following query: 1: SELECT [...]
How to return a more detailed response in your WSDL for web methods with a return type of XmlDocument
Thursday, September 18, 2008 7:50 No Commentsyou’ve develop your .net web service … get everything working just the way you like … and then you notice that auto generated wsdl provides a less then ideal definition for the response … something like: <s:complexType mixed=”true”> <s:sequence> <s:any /> </s:sequence> </s:complexType> .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, “Courier [...]