>

Role Extender

Posted on February 3, 2012 By

Application security is one of those inevitable things that every application you develop must handle. Thankfully, in ASP.NET, Microsoft has made security a pretty easy thing to implement. Most of the applications that I have created use Role based security (Read more here: Managing Authorization Using Roles) which can be easily configured in the web.config…


Inserting Records Conditionally

Posted on January 10, 2012 By

I faced a typical problem at work not too long ago dealing with inserting conditional data into a table. Typically I would write a bit of code to handle the conditional logic, but I thought about the problem for a bit and came up with a different solution using SQL. Here is the background of…


Hierarchical Data in SQL Server

Posted on December 23, 2011 By

Often times in applications, I am required to maintain data that has a hierarchical relationship such as a tree structure. The easiest way to approach this problem is to add a key to the table that refers to the record’s parent key. For example, in my last project, I needed to have a table that…


RiverMate – An Android App for River Levels

Posted on December 9, 2011 By

This free android app gives you the latest river level oberservations for rivers all over the United States. By selecting your state and/or county, you can select the rivers that you want to monitor. Add as many river gauges as you wish and they will be displayed and updated in real time on the app's…


Using SQL to get the number of occurrences of a character in a string in SQL Server

Posted on December 6, 2011 By

This SQL Snippet can be used to get the count of a single character, or an entire phrase, in a string.  We have a seperate post for doing the same thing in Oracle. Assume you have the string “a,b,c,d,e” and you want the count of commas (“,”) contained in that string.  Just use the SQL below:…