LessThanDot Site Logo

LessThanDot

A decade of helpful technical content

This is an archive of the posts published to LessThanDot from 2008 to 2018, over a decade of useful content. While we're no longer adding new content, we still receive a lot of visitors and wanted to make sure the content didn't disappear forever.

Meme Monday for December

This month’s meme, a concept created by Tom LaRock (Blog | Twitter), asks the question “What gift do you want Microsoft to leave for you under the tree this year?” Tom put this question up on the 30th of November so we had some time to think about it. Today is December 5th, my oldest son’s birthday. Since today is his birthday, I have a hard time thinking of anything for myself.

Read More...

SQL Advent 2011 Day 5: Common Table Expressions

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code that is written in the pre 2005 style and people still keep using those functions, procs and statements even though SQL Server 2005 and 2008 have much better functionality.

Read More...

SQL Advent 2011 Day 4: Schemas

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code that is written in the pre 2005 style and people still keep using those functions, procs and statements even though SQL Server 2005 and 2008 have much better functionality.

Read More...

SQL Advent 2011 Day 3: Partitioning

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code that is written in the pre 2005 style and people still keep using those functions, procs and statements even though SQL Server 2005 and 2008 have much better functionality.

Read More...

Android and barcode scanning

Barcode scanning is something I need to do a lot for work. But reading the barcodes is hard and in .Net I usually buy a framework to do the heavy lifting for me. In essence barcodereaders are nothing more then imagers that give an image of bits to the software, the software then tries to make sense of that. Most Android devices have such an imager. That imager is called the camera.

Read More...

Using T4 templates for Centralized Javascript

In my previous post I mentioned that I was looking for an answer to the age-old question of how to manage common CSS and JavaScript across multiple projects (specifically ASP.Net projects). Using T4 templates, I was able to not only create a common location for CSS files, but to take it a step farther and use Less in ordr to simplify that common CSS even further. But we left JavaScript out of the equation.

Read More...

How to call a user defined function with a default parameter

Someone had some trouble earlier today with calling a user defined function that has a default value for a parameter When you have a stored procedure with default values for parameters, you can omit those when calling the proc. With user defined functions, it works a little different, let’s take a look. First create this simple function CREATE FUNCTION dbo.fnTest(@param1 INT, @param2 int = 1 ) RETURNS int AS BEGIN RETURN @param2 END GO As you can see @param2 has a default of 1.

Read More...

CSS, Javascript, T4 Templates, and Less, Oh My

For the past few months, I have been looking for a way to define some JS and CSS files that would be shared between multiple projects in an ASP.Net solution. The intent is to define common scripts and CSS in one place instead of trying to keep multiple copies of it in sync or implementing an internal CDN with a versioning scheme. The challenge is finding a way to do this with a minimum of impact on the development, deployment, and production processes.

Read More...

SQL Advent 2011 Day 2: system tables and catalog views

In my Are you ready for SQL Server 2012 or are you still partying like it is 1999? post, I wrote about how you should start using SQL Server 2005 and SQL Server 2008 functionality now in order to prepare for SQL Server 2012. I still see tons of code that is written in the pre 2005 style and people still keep using those functions, procs and statements even though SQL Server 2005 and 2008 have much better functionality.

Read More...

How to capture the error output from a stored procedure when calling another stored procedure in SQL Server?

This is a quick post, this question was asked recently I have a stored procedure which is being called by some business objects and it’s working fine. I want to extend this stored procedure to call a new stored procedure (basically it will insert some of the passed in data into another table), but this isn’t working. How can I get the error output back from both stored procedures?

Read More...