<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dutton Software</title>
	<atom:link href="http://www.duttonsoftware.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.duttonsoftware.com</link>
	<description>Code, plug-ins &#38; more</description>
	<lastBuildDate>Fri, 05 Mar 2010 17:19:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solving Boggle-type word games in Python</title>
		<link>http://www.duttonsoftware.com/2010/01/07/solving-boggle-type-word-games-in-python/</link>
		<comments>http://www.duttonsoftware.com/2010/01/07/solving-boggle-type-word-games-in-python/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 00:14:46 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[python boggle scramble2]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=190</guid>
		<description><![CDATA[Recently I&#8217;ve been spending a lot of my spare time learning the Python computer programming language.  This all began because of an interest in the Google App Engine, which uses Python as the primary language.  I decided that it&#8217;d been a while since I picked up a new programming language (the last being [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been spending a lot of my spare time learning the <a href="http://www.python.org/" target="_blank">Python computer programming language</a>.  This all began because of an interest in the Google App Engine, which uses Python as the primary language.  I decided that it&#8217;d been a while since I picked up a new programming language (the last being C#) and I knew I&#8217;d have some spare time over the holidays.</p>
<p>Anyhow, there are a number of excellent learning resources for Python, but I seem to learn best by doing.  So, after tackling a number of levels in the <a href="http://www.pythonchallenge.com/" target="_blank">Python challenge</a> I decided to make my own challenge; Rack up a high score in Scramble and Scramble2, which is a &#8220;Boggle&#8221;-type game for Facebook and the iTouch/iPhone respectively.<br />
<a style="text-align: right;" title="Boggle" href="http://www.flickr.com/photos/27675896@N07/4039402557/" target="_blank"><img src="http://farm3.static.flickr.com/2523/4039402557_b779a76054_m.jpg" border="0" alt="Boggle" /></a><br />
<small><a title="Attribution License" href="http://creativecommons.org/licenses/by/2.0/" target="_blank"><img src="http://www.duttonsoftware.com/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="therichbrooks" href="http://www.flickr.com/photos/27675896@N07/4039402557/" target="_blank">therichbrooks</a></small></p>
<p><span id="more-190"></span>The game is played on a 4&#215;4 or 5&#215;5 grid of letters. Â The object is to attain a high score. Â You score by connecting adjacent letters into a word. Â Longer words result in disproportionally higher scores. Â The minimum word length is 3. Â You cannot use a letter-space more than once in the same word.</p>
<p>I created a Python program which compared all possible paths to a dictionary of known words and then printed them out in order from longest to shortest. Â The program is admittedly lacking in a user-interface. Â You have to re-run it to change the board size and it&#8217;s not super-optimized for either speed or memory. Â However, it does work quite well and is fast enough to use. Â It takes about 20-30 seconds to do the initial load of all the paths and then takes between 1-5 seconds to compute possible words once you type in the values from the game.</p>
<p>Below are the results from my Python program (left) and showing my &#8220;high score&#8221; of 369 (right).</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2010/01/scramble-solver-running-in-python-interpreter.png"><img class="alignnone size-medium wp-image-200" title="Scramble solver running in python interpreter" src="http://www.duttonsoftware.com/wp-content/uploads/2010/01/scramble-solver-running-in-python-interpreter-255x300.png" alt="" width="255" height="300" /></a> <a href="http://www.duttonsoftware.com/wp-content/uploads/2010/01/scramble-screenshot-with-high-score.png"><img class="alignnone size-medium wp-image-192" title="Scramble screenshot with high score" src="http://www.duttonsoftware.com/wp-content/uploads/2010/01/scramble-screenshot-with-high-score-300x211.png" alt="" width="300" height="211" /></a></p>
<p>With a better dictionary you could improve the score. Â In the example above, my dictionary has 3 of the 5 seven-letter words but misses the eight-letter word in the puzzle.</p>
<p>You can download the <a href="http://www.duttonsoftware.com/wp-content/uploads/2010/01/Scramble-Solver.zip">Scramble Solver.py &#8211; Python source code</a>. Â I used a list of words separated by carriage returns from a spell-checking &#8220;dictionary&#8221;. Â You are on your own for finding a word list. Â I&#8217;m providing the source code so that you can see it, not so you can beat the game :)</p>
<p>Below is a complete listing of the source code:</p>
<pre class="brush: python;">
class wordlist:
    &quot;&quot;&quot;
    Create a clean list of words from the base dictionary
    &quot;&quot;&quot;
    def __init__(self, max_length):
        # Constants
        self._rawpath = 'en_us.dic'
        self._maxlength = max_length

    def load(self):
        &quot;&quot;&quot;
        Returns a clean list of words
        &quot;&quot;&quot;
        print 'Creating list of words...'
        raw_dictionary = open(self._rawpath, 'r')
        goodwords = set()

        for line in raw_dictionary:
            # Make sure we have a word of the correct size and not starting with a number and with no apostrophes
            if (2 &lt; len(line) &lt; self._maxlength + 1
                and line[0] not in ['0','1','2','3','4','5','6','7','8','9']
                and &quot;'&quot; not in line):
                # Strip off trailing \n and convert to lowercase
                goodwords.add(line[:-1].lower())
        raw_dictionary.close()

        print 'Created list of words.'

        return goodwords

class pathlist:
    &quot;&quot;&quot;
    Creates a path list which contains all possible paths through the grid.
    &quot;&quot;&quot;

    def __init__(self, board_size, max_length):
        # Constants
        self._boardsize = board_size
        self._maxlength = max_length

        # Properties
        self.paths = []

    def _traversepath(self, startindex, previouspath):
        &quot;&quot;&quot;
        Finds all the paths for a given starting point,
        used recursively to explore adjacent segments
        &quot;&quot;&quot;
        # Immediately exit if we are trying to create a circular path
        # or if the path length gets too long
        if startindex in previouspath or len(previouspath) &gt;= self._maxlength:
            return

        # Copy the path and then add the next segment
        nextpath = previouspath[:]
        nextpath.append(startindex)

        # Only store paths of at least three letters
        if len(nextpath) &gt; 2:
            self.paths.append(nextpath)

        # Grab the row and column for the given startindex
        row = startindex // self._boardsize
        col = startindex % self._boardsize

        # Traverse adjacent paths
        # Up to 8 adjacent paths possible

        # Row above: row - 1
        if row - 1 &gt;= 0 and col - 1 &gt;= 0: self._traversepath(startindex - self._boardsize - 1, nextpath)
        if row - 1 &gt;= 0: self._traversepath(startindex - self._boardsize, nextpath)
        if row - 1 &gt;= 0 and col + 1 &lt;= 3: self._traversepath(startindex - self._boardsize + 1, nextpath)

        # Same row: row - 0
        if col - 1 &gt;= 0: self._traversepath(startindex - 1, nextpath)
        if col + 1 &lt;= 3: self._traversepath(startindex + 1, nextpath)

        # Row below: row + 1
        if row + 1 &lt;= 3 and col - 1 &gt;= 0: self._traversepath(startindex + self._boardsize - 1, nextpath)
        if row + 1 &lt;= 3: self._traversepath(startindex + self._boardsize, nextpath)
        if row + 1 &lt;= 3 and col + 1 &lt;= 3: self._traversepath(startindex + self._boardsize + 1, nextpath)

    def load(self):
        &quot;&quot;&quot;
        Returns a list of possible paths
        &quot;&quot;&quot;
        self.paths = []
        print 'Creating the path list...'
        # Generate self.paths by going through all positions
        for i in range(0, self._boardsize ** 2):
            self._traversepath(i, [])

        print 'Created the path list.'

        return self.paths

class solver:
    &quot;&quot;&quot;
    Class for solving 4x4 and 5x5 grid word puzzles using a dictionary
    &quot;&quot;&quot;
    def __init__(self, paths = None, dict = None):
        &quot;&quot;&quot;
        Loads up the dictionary and paths from file
        &quot;&quot;&quot;
        print 'Loading words...'
        self.dictionary = dict
        print 'Loaded %d words.' % len(self.dictionary)

        print 'Loading paths...'
        self.paths = paths
        print 'Loaded %d paths.' % len(self.paths)

        # initialize grid
        self.grid = []

    def _translate_path_to_letters(self, path, letters):
        &quot;&quot;&quot;
        Translates a numerical path to letters given a grid.

        Returns a string
        &quot;&quot;&quot;
        output = ''
        for p in path:
            output += letters[p]
        return output

    def _get_intersecting_words(self):
        &quot;&quot;&quot;
        Finds the intersection between the dictionary words
        and the (path-based) possible words

        Returns a subset of the possible words
        &quot;&quot;&quot;
        realwords = {}
        for word in self.dictionary:
            if self.possiblewords.has_key(word):
                realwords[word] = self.possiblewords[word]
        return realwords

    def get_words(self, letters):
        &quot;&quot;&quot;
        Returns a dictionary with keys of valid words.
        The values of the dictionary are the paths taken to get those valid words.
        For example, in the sample data set (4x4 board):
            Key: genius
            Value: [4, 8, 5, 6, 9, 10]
        &quot;&quot;&quot;
        output = ''
        self.grid = letters
        self.possiblewords = dict()

        # Translate all paths into letters
        print 'Translating all possible paths into possible words...'
        for path in self.paths:
            self.possiblewords[self._translate_path_to_letters(path, letters)] = path
        print 'Translated paths into %d unique words.' % len(self.possiblewords)

        print 'Finding possible real words...'
        realwords = self._get_intersecting_words()
        print 'Found %d possible real words.' % len(realwords)

        return realwords

MAXLENGTH = 10
BOARDSIZE = 4

pl = pathlist(BOARDSIZE, MAXLENGTH)
wl = wordlist(MAXLENGTH)
s = solver(pl.load(), wl.load())

while True:
    print 'Enter all %d lines in a row, with no spaces between them.  Or, press ENTER to use the default values.  Type &quot;q&quot; by itself to quit.' % BOARDSIZE
    line = raw_input(&quot;line:&quot;).lower()

    if line == 'q':
        break

    # Check to see if we should use the default values
    if len(line) == 0:
        print 'Using default values.'
        # Assumes BOARDSIZE of 4 or 5 only
        if BOARDSIZE == 4:
            line = 'oiei' + 'gnic' + 'eusn' + 'oliy'
        else:
            line = ''

    # Find all the possible words and their paths
    wordset = [word for word in s.get_words(line).keys()]

    # Print out the words, sorted from longest to shortest, ignoring the paths
    for word in sorted(wordset, None, len, True):
        print word
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2010/01/07/solving-boggle-type-word-games-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KB969856 &#8211; Security update for Microsoft Virtual PC 2007 installs repeatedly</title>
		<link>http://www.duttonsoftware.com/2009/11/29/kb969856-security-update-for-microsoft-virtual-pc-2007-installs-repeatedly/</link>
		<comments>http://www.duttonsoftware.com/2009/11/29/kb969856-security-update-for-microsoft-virtual-pc-2007-installs-repeatedly/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 03:38:28 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[KB]]></category>
		<category><![CDATA[Virtual PC]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=180</guid>
		<description><![CDATA[I had an issue with a Windows 2008 Server recently, where a security update for Microsoft Virtual PC 2007 would install successfully.  However, after rebooting, Windows Update would request that I install it again.  In the Windows Update history, it would show success, multiple times.  
It turns out the problem was that [...]]]></description>
			<content:encoded><![CDATA[<p>I had an issue with a Windows 2008 Server recently, where a security update for Microsoft Virtual PC 2007 would install successfully.  However, after rebooting, Windows Update would request that I install it again.  In the Windows Update history, it would show success, multiple times.  </p>
<p>It turns out the problem was that I had Virtual PC 2007 AND Virtual PC 2007 SP1 installed side-by-side.  I uninstalled my original Virtual PC 2007 (not SP1) and then applied the Windows Update and the problem was solved.</p>
<p>I&#8217;ve read of this same issue affecting Vista as well.  Hope this helps anyone who encounters this problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2009/11/29/kb969856-security-update-for-microsoft-virtual-pc-2007-installs-repeatedly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Reporting Services &#8220;interal error occurred&#8221;</title>
		<link>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/</link>
		<comments>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 06:37:45 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=169</guid>
		<description><![CDATA[If you work with SQL Server Reporting Services (SSRS) 2005 for any length of time, you&#8217;ll see a number of ambiguous error messages.Â  I recently ran into the error below and found the solution quite easy.Â  Maybe you&#8217;ll encounter this one day and I&#8217;ll save you some headache.

An error occurred during local report processing.
The definition [...]]]></description>
			<content:encoded><![CDATA[<p>If you work with SQL Server Reporting Services (SSRS) 2005 for any length of time, you&#8217;ll see a number of ambiguous error messages.Â  I recently ran into the error below and found the solution quite easy.Â  Maybe you&#8217;ll encounter this one day and I&#8217;ll save you some headache.</p>
<blockquote>
<div><em>An error occurred during local report processing.</em></div>
<div><em>The definition of the report &#8216;/Main&#8217; is invalid.</em></div>
<div><em>An internal error occurred on the report server. See the error log for more details.</em></div>
<div><em><br />
</em></div>
</blockquote>
<div>I could not view the error log, since I was previewing the report.Â  This problem happened simply because I had a Dataset with the same name as my table.Â  I had recently changed the name of my table to make more sense, not realizing that the Dataset was named the same.Â  To solve this problem, I renamed my table, but I could have renamed the Dataset just as easily.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2009/02/08/sql-server-reporting-services-interal-error-occurred/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Duplicates in SharePoint Datasheet view / Export to Spreadsheet (Excel)</title>
		<link>http://www.duttonsoftware.com/2009/01/19/duplicates-in-sharepoint-datasheet-view-export-to-spreadsheet-excel/</link>
		<comments>http://www.duttonsoftware.com/2009/01/19/duplicates-in-sharepoint-datasheet-view-export-to-spreadsheet-excel/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 07:09:32 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[WSS 3.0]]></category>
		<category><![CDATA[Datasheet]]></category>
		<category><![CDATA[duplicates]]></category>
		<category><![CDATA[Export to Excel]]></category>
		<category><![CDATA[Export to Spreadsheet]]></category>
		<category><![CDATA[MOSS 2007]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=158</guid>
		<description><![CDATA[Recently I encountered a bug in SharePoint where sometimes duplicate items appear when viewing items in Datasheet view in SharePoint.Â  This also happens when using the Export to Spreadsheet (Excel).Â  If duplicates appear in Datasheet view, they will also appear during Export to Spreadsheet and vice versa.
This happens only under specific circumstances.Â  The base list [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I encountered a bug in SharePoint where sometimes duplicate items appear when viewing items in Datasheet view in SharePoint.Â  This also happens when using the Export to Spreadsheet (Excel).Â  If duplicates appear in Datasheet view, they will also appear during Export to Spreadsheet and vice versa.</p>
<p>This happens only under specific circumstances.Â  The base list must have a required lookup column/field that is multi-value.Â  The view must not include this column.</p>
<p>A required, multi-value lookup column is created to demonstrate the problem:<img class="alignnone size-full wp-image-159" title="1-required-multi-value-lookup-field" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/1-required-multi-value-lookup-field.jpg" alt="1-required-multi-value-lookup-field" width="747" height="423" /></p>
<p>An example of the list data in standard view, showing the &#8220;Region&#8221; column:<br />
<img class="alignnone size-full wp-image-160" title="2-example-data-showing-required-multi-value-lookup-field" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/2-example-data-showing-required-multi-value-lookup-field.jpg" alt="2-example-data-showing-required-multi-value-lookup-field" width="509" height="144" /></p>
<p>I created a new view without the &#8220;Region&#8221; column to show the duplicates bug.Â  Standard view appears normal:<br />
<img class="alignnone size-full wp-image-161" title="3-view-without-required-multi-value-lookup-field" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/3-view-without-required-multi-value-lookup-field.jpg" alt="3-view-without-required-multi-value-lookup-field" width="509" height="144" /></p>
<p>Same view, but when switched to Datasheet view, duplicate records show:<br />
<img class="alignnone size-full wp-image-162" title="4-datasheet-view-without-required-multi-value-lookup-field-shows-duplicate-items" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/4-datasheet-view-without-required-multi-value-lookup-field-shows-duplicate-items.jpg" alt="4-datasheet-view-without-required-multi-value-lookup-field-shows-duplicate-items" width="202" height="236" /></p>
<p>Same view in Export to Spreadsheet shows duplicates:<br />
<img class="alignnone size-full wp-image-163" title="5-export-to-spreadsheet-without-required-multi-value-lookup-field-shows-duplicate-items" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/5-export-to-spreadsheet-without-required-multi-value-lookup-field-shows-duplicate-items.jpg" alt="5-export-to-spreadsheet-without-required-multi-value-lookup-field-shows-duplicate-items" width="322" height="195" /></p>
<p>If the column is not required, everything works fine.Â  If the column exists in the view, everything is fine.Â  It is only when the required column is omitted from the view that you see duplicates.</p>
<p>If the column is included from the view, everything is normal during Edit in Datasheet mode:<br />
<img class="alignnone size-full wp-image-164" title="6-datasheet-view-shows-multi-value-lookup-field-no-duplicate-items" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/6-datasheet-view-shows-multi-value-lookup-field-no-duplicate-items.jpg" alt="6-datasheet-view-shows-multi-value-lookup-field-no-duplicate-items" width="496" height="148" /></p>
<p>Duplicates are now gone in Export to Spreadsheet as well:<br />
<img class="alignnone size-full wp-image-165" title="7-export-to-spreadsheet-with-required-multi-value-lookup-field-no-duplicates" src="http://www.duttonsoftware.com/wp-content/uploads/2009/01/7-export-to-spreadsheet-with-required-multi-value-lookup-field-no-duplicates.jpg" alt="7-export-to-spreadsheet-with-required-multi-value-lookup-field-no-duplicates" width="603" height="116" /></p>
<p>There seems to be no fix for this problem.Â  The work-around is, if you have a required multi-value lookup column, to always add the column to views, especially datasheet views.Â  If a user creates their own view without the column, they may run into this problem.Â  User education is the only solution in this case.</p>
<p>Although this seems like a rare circumstance, it does appear that <a href="http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/a36f7b72-9b4d-4f16-aea8-7d08b1594096/" target="_blank">multiple SharePoint users are encountering this problem</a>.Â  This affects both WSS 3.0 and MOSS 2007.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2009/01/19/duplicates-in-sharepoint-datasheet-view-export-to-spreadsheet-excel/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>String extensions &#8211; Case-insensitive Replace and Contains</title>
		<link>http://www.duttonsoftware.com/2008/12/07/string-extensions-case-insensitive-replace-and-contains/</link>
		<comments>http://www.duttonsoftware.com/2008/12/07/string-extensions-case-insensitive-replace-and-contains/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 04:52:44 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Microsoft .NET]]></category>
		<category><![CDATA[Contains]]></category>
		<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Replace]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=125</guid>
		<description><![CDATA[The C# string library is pretty comprehensive, but there are a few methods that were left out.  Luckily, in C# 3.0 extensions were introduced, which allows developers to seemingly add methods to existing classes.  Remember that extensions only work inside the same namespace, so you&#8217;ll have to rename &#8220;MyNamespace&#8221; in the example below.
Two [...]]]></description>
			<content:encoded><![CDATA[<p>The C# string library is pretty comprehensive, but there are a few methods that were left out.  Luckily, in C# 3.0 extensions were introduced, which allows developers to seemingly add methods to existing classes.  Remember that extensions only work inside the same namespace, so you&#8217;ll have to rename &#8220;MyNamespace&#8221; in the example below.</p>
<p>Two of the missing methods are case-insensitive versions of the methods &#8220;Contains&#8221; and &#8220;Replace&#8221;.  I do not take credit for writing the methods &#8212; I found them on Google and have provided references in the code.  I did add the comments to make the overloaded methods match the originals.  I also tested them to make sure they behaved like the originals when provided with a null or empty string.</p>
<p>I&#8217;m not sure why the .NET team did not provide case-insensitive Replace or case-insensitive Contains, they do it with many other string methods like StartsWith and EndsWith.  Hopefully these help.</p>
<p>The case-insensitive Contains code is heavily based on <a href="http://social.msdn.microsoft.com/Forums/en-US/vbgeneral/thread/566ed130-361d-44d0-b6dc-cbcd19d57627/" target="_new">a post on this forum</a>.  The case-insensitive Replace code is heavily based on <a href="http://www.codeproject.com/script/Forums/View.aspx?fid=195463&amp;msg=2514269" target="_new">a Code Project comment</a>.  Learn more about <a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx" target="_new">C# extensions on MSDN</a>.</p>
<p>Please note that I had to butcher some of the XML comments because the code formatter was deleting them.  It shouldn&#8217;t affect compiling, but you may have to fix some if you want the full Intellisense.</p>
<pre class="brush: csharp;">
using System;
using System.Text;

namespace MyNamespace
{
    /// &lt;summary&gt;
    /// Overloads the string object and adds case-insenstive options to certain methods
    /// &lt;/summary&gt;
    public static class StringExtensions
    {
        /// &lt;summary&gt;
        /// Returns a value indicating whether the specified System.String object occurs
        /// within this string.
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;original&quot;&gt;The System.String object to be checked.&lt;/param&gt;
        /// &lt;param name=&quot;value&quot;&gt;The System.String object to seek.&lt;/param&gt;
        /// &lt;param name=&quot;comparisonType&quot;&gt;One of the System.StringComparison values that
        /// determines how this string and value are compared.&lt;/param&gt;
        /// &lt;returns&gt;true if the value parameter occurs within this string, or
        /// if value is the empty string (&quot;&quot;); otherwise, false.&lt;/returns&gt;
        /// &lt;exception cref=&quot;System.ArgumentNullException&quot;&gt;value is null.&lt;/exception&gt;
        static public bool Contains(this string original, string value, StringComparison comparisonType)
        {
            if (original == null)
                throw new NullReferenceException(&quot;Object reference not set to an instance of an object.&quot;);

            if (value == null)
                throw new ArgumentNullException(&quot;value&quot;);

            if (String.Empty == value)
                return true;

            return (0 &lt; = original.IndexOf(value, comparisonType));
        }

        /// &lt;summary&gt;
        /// Replaces all occurrences of a specified System.String in this instance
        /// with another specified System.String. &lt; / summary&gt;
        /// &lt;param name=&quot;original&quot;&gt;The System.String object to be searched.&lt;/param&gt;
        /// &lt;param name=&quot;oldValue&quot;&gt;A System.String to be replaced.&lt;/param&gt;
        /// &lt;param name=&quot;newValue&quot;&gt;A System.String to replace all occurrences of oldValue.&lt;/param&gt;
        /// &lt;param name=&quot;comparisonType&quot;&gt;One of the System.StringComparison values that
        /// determines how this string and value are compared.&lt;/param&gt;
        /// &lt;returns&gt;A System.String equivalent to this instance but with all
        /// instances of oldValue replaced with newValue.&lt;/returns&gt;
        /// &lt;exception cref=&quot;System.ArgumentNullException&quot;&gt;oldValue is null.&lt;/exception&gt;
        /// &lt;exception cref=&quot;System.ArgumentException&quot;&gt;oldValue is the empty string (&quot;&quot;).&lt;/exception&gt;
        static public string Replace(this string original, string oldValue, string newValue, StringComparison comparisonType)
        {
            if (original == null)
                throw new NullReferenceException(&quot;Object reference not set to an instance of an object.&quot;);

            if (oldValue == null)
                throw new ArgumentNullException(&quot;oldValue&quot;);

            if (String.Empty == oldValue)
                throw new ArgumentException(&quot;oldValue&quot;);

            int lenPattern = oldValue.Length;
            int idxPattern = -1;
            int idxLast = 0;

            StringBuilder result = new StringBuilder(original.Length);

            while (true)
            {
                idxPattern = original.IndexOf(oldValue, idxPattern + 1, comparisonType);

                if (idxPattern &lt; 0)
                {
                    result.Append(original, idxLast, original.Length - idxLast);
                    break;
                }

                result.Append(original, idxLast, idxPattern - idxLast);
                result.Append(newValue);

                idxLast = idxPattern + lenPattern;
            }

            return result.ToString();
        }
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/12/07/string-extensions-case-insensitive-replace-and-contains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Non-queried multi-value parameters in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 07:39:49 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[Multi-value parameters]]></category>
		<category><![CDATA[non-queried parameters]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=117</guid>
		<description><![CDATA[As a follow-up to my previous post on Easy multi-value parameters in SQL Server Reporting Services, I wanted to point out some information on non-queried, or static multi-value parameters.
For my example, I&#8217;m using a parameter named &#8220;Time&#8221; with choices &#8220;Morning&#8221;, &#8220;Noon&#8221;, and &#8220;Night&#8221;. Â The values are M, N, and I respectively. Â You can see how [...]]]></description>
			<content:encoded><![CDATA[<p>As a follow-up to my previous post on <a title="Easy multi-value parameters in SQL Server Reporting Services" href="http://www.duttonsoftware.com/2008/09/25/easy-multi-value-parameters-in-sql-server-reporting-services/" target="_self">Easy multi-value parameters in SQL Server Reporting Services</a>, I wanted to point out some information on non-queried, or static multi-value parameters.</p>
<p>For my example, I&#8217;m using a parameter named &#8220;Time&#8221; with choices &#8220;Morning&#8221;, &#8220;Noon&#8221;, and &#8220;Night&#8221;. Â The values are M, N, and I respectively. Â You can see how I set up the parameter in the following screenshot.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-dialog.png"><img class="alignnone size-full wp-image-118" title="multi-value-parameters-non-queried-default-dialog" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-dialog.png" alt="" width="500" height="393" /></a></p>
<p>You can accomplish having all the checkboxes selected by default in two ways. Â The first way is to pass an object array of values, and the easiest way to do that is to use the Split command to split a string into a string array. Â I used <strong>=Split(&#8220;M,N,I&#8221;,&#8221;,&#8221;)</strong> as my default. Â I had to provide the second parameter for Split, the delimiter, because the default is space.</p>
<p>The second, and easier method, is to just add a line item for each item you want checked, as demonstrated in this screenshot:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-simple-method.png"><img class="alignnone size-full wp-image-123" title="multi-value-parameters-non-queried-default-simple-method" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-simple-method.png" alt="" width="459" height="153" /></a></p>
<p>Here is the resulting parameter list, showing all the items selected (same for either method):</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-results.png"><img class="alignnone size-full wp-image-119" title="multi-value-parameters-non-queried-default-results" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-default-results.png" alt="" width="244" height="56" /></a></p>
<p>Sometimes, you need to display the parameters of your report, perhaps so it could be regenerated later. Â You&#8217;ll need to print out that object array, so use the opposite of Split, <strong>Join</strong>. Â Below is a textbox with an expression of <strong>=Join(Parameters!Time.Label, &#8220;, &#8220;)</strong>, which joins the parameter values together with a comma and space separator.</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-code.png"><img class="alignnone size-full wp-image-120" title="multi-value-parameters-non-queried-display-label-code" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-code.png" alt="" width="299" height="72" /></a></p>
<p>Here is the result of the code, with two parameters selected shown:</p>
<p><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-results.png"><img class="alignnone size-full wp-image-121" title="multi-value-parameters-non-queried-display-label-results" src="http://www.duttonsoftware.com/wp-content/uploads/2008/12/multi-value-parameters-non-queried-display-label-results.png" alt="" width="254" height="154" /></a></p>
<p>If you only put the parameter label in the textbox (i.e. using code <strong>=Parameters!Time.Label</strong>) then when you display the report, you&#8217;ll get the famous Reporting Services #Error message. Â You have to use <strong>Join</strong> in this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/12/05/non-queried-multi-value-parameters-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More on SharePoint &#8220;User not found&#8221; error with Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 05:05:34 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[WSS 3.0]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=101</guid>
		<description><![CDATA[Following up my initial post on the SharePoint &#8220;User not found error with Reporting Services in integrated mode, I wanted to post another reason for the &#8220;User not found&#8221; error.
If, somewhere in the site author tree, you have user accounts that no longer exist, you will encounter the &#8220;User not found&#8221; error while viewing the [...]]]></description>
			<content:encoded><![CDATA[<p>Following up my initial post on the <a href="http://www.duttonsoftware.com/2008/08/06/sharepoint-user-not-found-error-with-reporting-services-in-integrated-mode/" target="_self">SharePoint &#8220;User not found error with Reporting Services in integrated mode</a>, I wanted to post another reason for the &#8220;User not found&#8221; error.</p>
<p>If, somewhere in the site author tree, you have user accounts that no longer exist, you will encounter the &#8220;User not found&#8221; error while viewing the report and browsing the list of shared data sources.</p>
<p class="storytitle">I found two good blog articles about this issue as well as a solution here:</p>
<ul>
<li><a rel="bookmark" href="http://blog.krichie.com/2008/07/24/wherefore-art-thou-author/" target="_blank">Wherefore Art Thou Author?</a></li>
<li><a rel="bookmark" href="http://blog.krichie.com/2008/09/12/resetting-the-author-on-a-sharepoint-site-or-wherefore-art-thou-author-redux/">Resetting the Author on a SharePoint site, or Wherefore Art Thou Author Redux</a></li>
</ul>
<p>I modified the code a bit to just show the site author without resetting it.  I also changed the code to explicitly dispose of the SharePoint objects.</p>
<p>The utility takes two parameters, the first is the site URL.  If you only pass one parameter, it looks up the site author.  If you pass a second parameter (in the format of DOMAIN\USER), the site author will be reset to the value you supply.</p>
<p><span id="more-101"></span></p>
<p>To build, run this from the command-line:</p>
<pre>%WINDIR%\Microsoft.NET\Framework\v2.0.50727\csc /target:exe /out:SPResetAuthor.exe SPResetAuthor.cs
/reference:"%COMMONPROGRAMFILES%\Microsoft Shared\web server extensions\12\ISAPI\Microsoft.SharePoint.dll"</pre>
<p>Source code of <a href='http://www.duttonsoftware.com/wp-content/uploads/2008/10/spresetauthorcs.txt'>SPResetAuthor.cs</a>:</p>
<pre>
using System;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

// Original code from: http://blog.krichie.com/2008/09/12/
//      resetting-the-author-on-a-sharepoint-site-or-wherefore-art-thou-author-redux/

namespace SPResetAuthor
{
  class Program
  {
    static void Main(string[] args)
    {
      if (args.Length < 1)
      {
        StringBuilder sb = new StringBuilder();
        sb.Append("\nSYNTAX: SPResetAuthor.exe (Site URL) [new owner]  \n");
        sb.Append("\nwhere:\n\n");
        sb.Append("\n\t(Site URL) - The web URL for"
            + " the site i.e. http://sharepoint/site/");
        sb.Append("\n\t[new owner] - The login account"
            + " for the new author, i.e. DOMAIN\\USER");
        Console.WriteLine(sb.ToString());
        return;
      }
      // Open the site collection
      Console.WriteLine("Opening site collection for: {0}", args[0]);
      using (SPSite site = new SPSite(args[0]))
      {
        // Open the web via the URL passed in
        Console.WriteLine("Opening site (web)...");

        using (SPWeb web = site.OpenWeb())
        {
          Console.WriteLine("Site (web) title: " + web.Title);
          if (args.Length == 1)
          {
            Console.WriteLine("Attempting to retrieve author for site");
            try
            {
              Console.WriteLine("web.Author: {0}", web.Author.ToString());
            }
            catch (Exception ex)
            {
              Console.WriteLine("Exception occured:\n{0}", ex.ToString());
            }
          }
          if (args.Length == 2)
          {
            Console.WriteLine("Resetting Author to: {0}", args[1]);
            SPUser user = web.EnsureUser(args[1]);
            web.Author = user;
            web.Update();
            Console.WriteLine("Author for site {0}, reset to {1}", args[0], args[1]);
            Console.WriteLine("Author ID: " + web.Author.ID.ToString());
            Console.WriteLine("Author Name: " + web.Author.Name);
          }
        }
      }
    }
  }
}
</pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/30/more-on-sharepoint-user-not-found-error-with-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 little things I don&#8217;t like about Windows Server 2008 / Vista</title>
		<link>http://www.duttonsoftware.com/2008/10/26/6-little-things-i-dont-like-about-windows-server-2008-vista/</link>
		<comments>http://www.duttonsoftware.com/2008/10/26/6-little-things-i-dont-like-about-windows-server-2008-vista/#comments</comments>
		<pubDate>Mon, 27 Oct 2008 06:48:15 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=92</guid>
		<description><![CDATA[I&#8217;ve been using Windows Server 2008 since it was released in February.  In general, Server 2008 is a huge improvement over 2003, however, there are a number of little things that annoy me, all of which are also found in Vista.  I plan to talk later about my favorite features in Server 2008, but I&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Windows Server 2008 since it was released in February.  In general, Server 2008 is a huge improvement over 2003, however, there are a number of little things that annoy me, all of which are also found in Vista.  I plan to talk later about my favorite features in Server 2008, but I&#8217;ll start with my pet peeves:</p>
<p><strong>1. Folder icons have been turned sideways</strong></p>
<p><span> </span>I understand this was done to give a better visual indicator.<span> </span>But who stores real manila folders on their side?<span> </span>Defeats the metaphor if you ask me.</p>
<div id="attachment_93" class="wp-caption aligncenter" style="width: 213px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/1-folder-icons-now-on-their-side.jpg"><img class="size-full wp-image-93" title="1-folder-icons-now-on-their-side" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/1-folder-icons-now-on-their-side.jpg" alt="Folder icons are now on their side" width="203" height="75" /></a><p class="wp-caption-text">Folder icons are now sideways</p></div>
<p><strong>2. Start menu scrolling is a pain</strong></p>
<p><span style="font-family: Calibri; font-size: 11pt;">I don&#8217;t like having a fixed size start menu.  Why should I have to scroll to see menu items?  I would like to be able to re-size the      menu, but this isn&#8217;t really possibly.<span> You can make the menu bigger </span>by bumping up the number of recent items, but you&#8217;ll still have to scroll.<span> To adjust the Start menu size, </span>right click on Start menu, choose <strong>Properties</strong>.<span> </span>Select the top <strong>Customize…</strong> button.<span> </span>In the <strong>Start menu size</strong> group, select the <strong>Number of recent programs to display</strong> option.</span></p>
<div id="attachment_94" class="wp-caption aligncenter" style="width: 266px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/2-start-menu-scrolling-is-a-pain.jpg"><img class="size-full wp-image-94" title="2-start-menu-scrolling-is-a-pain" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/2-start-menu-scrolling-is-a-pain.jpg" alt="Start menu scrolling is a pain" width="256" height="464" /></a><p class="wp-caption-text">Start menu scrolling is a pain</p></div>
<p><strong><span style="font-family: Calibri; font-size: 11pt;">3. Start menu icon only appears on mouse over</span></strong></p>
<p><span style="font-family: Calibri; font-size: 11pt;">Not having icons on the Start      menu for <strong>Document</strong>, <strong>Computer</strong>, <strong>Network</strong>, etc is just annoying.<span> </span>Icons are there for a visual depiction.<span> </span>Having icons apart from the actual item      is distracting.  They should either have an icon or not&#8211;don&#8217;t stick it in as an afterthought.<br />
</span></p>
<div id="attachment_95" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/3-start-menu-icons-only-appear-on-mouse-over.jpg"><img class="size-full wp-image-95" title="3-start-menu-icons-only-appear-on-mouse-over" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/3-start-menu-icons-only-appear-on-mouse-over.jpg" alt="Start menu icons only appear on mouse over" width="500" height="329" /></a><p class="wp-caption-text">Start menu icon only appears on mouse over</p></div>
<p><strong><span style="font-family: Calibri; font-size: 11pt;">4. Confusing verbs in the Network and Sharing Center</span></strong></p>
<p><span style="font-family: Calibri; font-size: 11pt;">The <strong>Tasks</strong> in the <strong>Network and Sharing Center</strong> are about as confusing as it gets.  If I want to set my IP      address for my wireless adapter, which would I choose: Manage wireless networks, Set up a connection, or Manage network connection?  Like a lot of Microsoft products, there are too many ways to do the same thing.  So many similarly worded choices just add to the confusion.</span></p>
<div id="attachment_96" class="wp-caption aligncenter" style="width: 199px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/4-confusing-verbs-in-the-network-and-sharing-center.jpg"><img class="size-full wp-image-96" title="4-confusing-verbs-in-the-network-and-sharing-center" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/4-confusing-verbs-in-the-network-and-sharing-center.jpg" alt="Confusing verbs in the Network and Sharing center" width="189" height="228" /></a><p class="wp-caption-text">Confusing verbs in the Network and Sharing Center</p></div>
<p><strong><span style="font-family: Calibri; font-size: 11pt;">5.  In Explorer, column resizer is too small</span></strong></p>
<p><span style="font-family: Calibri; font-size: 11pt;">In Explorer windows, Vista/Server 2008 added the filter drop down.  I love this feature but they managed to make resizing columns much more difficult.  The resizer now has just a few pixels where it&#8217;s active.  To top it off, when you click on the arrow for the filter, it pops down.  Click it again, and it stays down.  You can&#8217;t get it to go away.  Drag the filter arrow and it takes the whole column, so you can re-order them.  Why not just make the filter arrow part of the column resizer?  It makes more sense than it does to re-order the columns and I bet it happens a lot more often.<br />
</span></p>
<div id="attachment_97" class="wp-caption aligncenter" style="width: 398px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/5-in-explorer-column-resizer-is-too-small.jpg"><img class="size-full wp-image-97" title="5-in-explorer-column-resizer-is-too-small" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/5-in-explorer-column-resizer-is-too-small.jpg" alt="In Explorer, column resizer is too small" width="388" height="163" /></a><p class="wp-caption-text">In Explorer, column resizer is too small</p></div>
<p><strong><span style="font-family: Calibri; font-size: 11pt;">6. Not having the &#8220;up one      folder&#8221; button in Explorer.<span> </span></span></strong></p>
<p><span style="font-family: Calibri; font-size: 11pt;">There is a pretty good bread-crumb navigation in Explorer now.  There is a back button.  But, there is no &#8220;up one folder&#8221; button, like there used to be.  I      know, you can click on the actual item, but having to hunt visually is not      nearly as effective as clicking a single button that is always there.<span> </span>At least the keyboard shortcut (backspace) is      intact.</span></p>
<div id="attachment_98" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/6-two-other-ways-to-move-but-no-up-button.jpg"><img class="size-full wp-image-98" title="6-two-other-ways-to-move-but-no-up-button" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/6-two-other-ways-to-move-but-no-up-button.jpg" alt="Missing the &quot;up one folder&quot; button" width="500" height="52" /></a><p class="wp-caption-text">Missing the &quot;up one folder&quot; button</p></div>
<div id="attachment_99" class="wp-caption aligncenter" style="width: 329px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/6-the-old-up-button.jpg"><img class="size-full wp-image-99" title="6-the-old-up-button" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/6-the-old-up-button.jpg" alt="The old &quot;UP&quot; button - where did you go?" width="319" height="94" /></a><p class="wp-caption-text">The old &quot;UP&quot; button - where did you go?</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/26/6-little-things-i-dont-like-about-windows-server-2008-vista/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>T-SQL missing comma in SELECT does not generate parsing error</title>
		<link>http://www.duttonsoftware.com/2008/10/22/t-sql-missing-comma-in-select-does-not-generate-parsing-error/</link>
		<comments>http://www.duttonsoftware.com/2008/10/22/t-sql-missing-comma-in-select-does-not-generate-parsing-error/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 05:34:24 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[T-SQL]]></category>
		<category><![CDATA[SQL Server]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=84</guid>
		<description><![CDATA[I ran in to this &#8220;gotcha&#8221; the other day while writing a number of views. I omitted a comma on my SELECT statement, and the parser did not return an error, but rather just results that I did not expect. The problem is that SQL Server interprets the missing comma as an implied column name. [...]]]></description>
			<content:encoded><![CDATA[<p>I ran in to this &#8220;gotcha&#8221; the other day while writing a number of views. I omitted a comma on my SELECT statement, and the parser did not return an error, but rather just results that I did not expect. The problem is that SQL Server interprets the missing comma as an implied column name. It is as if there is an unwritten &#8220;AS&#8221; where the missing comma should go.</p>
<p>Screenshots of the three scenarios:</p>
<div id="attachment_85" class="wp-caption alignnone" style="width: 484px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/desired-query-with-correct-syntax.jpg"><img class="size-full wp-image-85" title="desired-query-with-correct-syntax" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/desired-query-with-correct-syntax.jpg" alt="Desired query with the correct syntax" width="474" height="182" /></a><p class="wp-caption-text">The correct query returns the desired results: two columns of information</p></div>
<div id="attachment_86" class="wp-caption alignnone" style="width: 505px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/accidentially-left-off-the-comma-only-one-column-returned.jpg"><img class="size-full wp-image-86" title="accidentially-left-off-the-comma-only-one-column-returned" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/accidentially-left-off-the-comma-only-one-column-returned.jpg" alt="Accidentially leaving off the comma results in only one column (with the wrong data)" width="495" height="181" /></a><p class="wp-caption-text">Accidentally leaving off the comma results in only one column (with the wrong data)</p></div>
<div id="attachment_87" class="wp-caption alignnone" style="width: 474px"><a href="http://www.duttonsoftware.com/wp-content/uploads/2008/10/explicit-as-same-results-as-omitting-comma.jpg"><img class="size-full wp-image-87" title="explicit-has-same-results-as-omitting-comma" src="http://www.duttonsoftware.com/wp-content/uploads/2008/10/explicit-as-same-results-as-omitting-comma.jpg" alt="Adding in an explicit &quot;AS&quot; gives the same results as omitting the comma" width="464" height="184" /></a><p class="wp-caption-text">Adding in an explicit &quot;AS&quot; gives the same results as omitting the comma</p></div>
<p>I&#8217;ve been working with SQL for years and never had this issue before. I supposed it is because if I make a mistake like this, I usually omit more than one comma, which causes a parsing error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/22/t-sql-missing-comma-in-select-does-not-generate-parsing-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sorting via parameters in SQL Server Reporting Services</title>
		<link>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/</link>
		<comments>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 05:09:01 +0000</pubDate>
		<dc:creator>Aaron</dc:creator>
				<category><![CDATA[SQL Server Reporting Services]]></category>
		<category><![CDATA[SSRS]]></category>

		<guid isPermaLink="false">http://www.duttonsoftware.com/?p=77</guid>
		<description><![CDATA[In SQL Server Reporting Services (SSRS) there are two different methods for a user to sort their reports after they have been generated. Other folks have done a superb job of explaining each method, so I&#8217;ll just point you to their sites:
The user can interactively sort on a header textbox by just setting the &#8220;interactive [...]]]></description>
			<content:encoded><![CDATA[<p>In SQL Server Reporting Services (SSRS) there are two different methods for a user to sort their reports after they have been generated. Other folks have done a superb job of explaining each method, so I&#8217;ll just point you to their sites:</p>
<p>The user can interactively sort on a header textbox by just setting the &#8220;interactive sort&#8221; properties:<br />
<a href="http://weblogs.sqlteam.com/joew/archive/2008/08/02/60666.aspx">http://weblogs.sqlteam.com/joew/archive/2008/08/02/60666.aspx</a></p>
<p>You can also sort using standard report parameters:<br />
<a href="http://www.databasejournal.com/features/mssql/article.php/10894_3492236">http://www.databasejournal.com/features/mssql/article.php/10894_3492236</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.duttonsoftware.com/2008/10/22/sorting-via-parameters-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
