<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Bits of Bytes</title>
	<atom:link href="http://bitsofbytes.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://bitsofbytes.wordpress.com</link>
	<description></description>
	<lastBuildDate>Wed, 25 Nov 2009 09:57:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='bitsofbytes.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Bits of Bytes</title>
		<link>http://bitsofbytes.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://bitsofbytes.wordpress.com/osd.xml" title="Bits of Bytes" />
	<atom:link rel='hub' href='http://bitsofbytes.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Video streaming using Windows Media Services (Part 1)</title>
		<link>http://bitsofbytes.wordpress.com/2009/11/25/video-streaming-using-windows-media-services-part-1/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/11/25/video-streaming-using-windows-media-services-part-1/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 09:53:59 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/2009/11/25/video-streaming-using-windows-media-services-part-1/</guid>
		<description><![CDATA[This post talks about unicast and on-demand streaming of a video. On-demand unicast is the way when you would like the clients to have control on the playback and require only one server connection per client. The user experience here is similar to playing a movie from a DVD player where you would be able [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=103&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[</p>
<p align="justify">This post talks about unicast and on-demand streaming of a video. </p>
<p align="justify">On-demand unicast is the way when you would like the clients to have control on the playback and require only one server connection per client. The user experience here is similar to playing a movie from a DVD player where you would be able to pause, rewind, fast-forward the media content unlike the broadcast multicast/unicast where the user has no choice to control the playback.</p>
<p align="justify">To deliver content to users by using a streaming method, you can save the content to a <u>Windows Media server</u>, and then <u>assign the content to a publishing point</u>. You can then provide users with access to the content by either creating an announcement file or by supplying users with the <u>URL of the publishing point</u>.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/image.png"><img style="border-bottom:0;border-left:0;display:inline;border-top:0;border-right:0;" title="image" border="0" alt="image" src="http://bitsofbytes.files.wordpress.com/2009/11/image_thumb.png?w=400&#038;h=141" width="400" height="141" /></a> </p>
<p>In the figure, there is an on-demand publishing point named TV1 on the Windows Media server called Server1. This publishing point identifies the location of the content you want to stream.</p>
<p>Windows Media Services requires no additional configuration and is ready for on-demand streaming. All you need to do is place the file that you want to stream in the default Windows Media Services content directory. The file can be either a Windows Media file or an .mp3 file. A Windows Media file is a file containing audio, video, or script data that is stored in Windows Media Format (file name extensions, such as .wma, .wme, .wms, .wmv, .wmx, .wmz, or .wvx)</p>
<ul>
<li>Copy the file to the %<i>systemdrive</i>%\Wmpub\WMRoot folder on your Windows Media server. Your server is now ready to stream the file.</li>
</ul>
<p>After installing the Windows Media Services 2009, if you start the control panel and check the ‘Control Protocol’ option,&#160; by default the only enabled option is <a href="http://en.wikipedia.org/wiki/RTSP">RTSP</a> (Real Time Streaming Protocol)&#160; So basically your streams would respond to a mms://&lt;url&gt; link for you and open in Windows Media Player or something that plays back that media. <b>Microsoft Media Server</b> (MMS) is the name of Microsoft&#8217;s proprietary network streaming protocol used to transfer unicast data in Windows Media Services. To get your stream play in Silverlight, you have to enable the HTTP-based streaming. Silverlight basically looks at the mms:// &lt;url&gt; and translates that to get the stream over HTTP instead. The default port 80 might already be taken by IIS.&#160; Right click on the HTTP control protocol and choose properties, then choose the IP addresses and/or the port you want it to operate on.&#160; Save those settings and then enable the protocol.</p>
<p>To become more familiar with Windows Media Services capabilities, take the tour here. <strong>Start &gt;&gt; </strong><strong>Run</strong> and then type <strong>%systemroot%\system32\windows media\server\admin\mmc\hta\tour_.hta</strong></p>
<p>To start the Windows Media Services management interface and configure your streaming media server, <strong>Start &gt;&gt; </strong><strong>Run</strong> and then type <strong>%systemroot%\system32\windows media\server\admin\mmc\wmsadmin.msc</strong></p>
<p><font color="#697c83">More details about streaming can be obtained here:</font></p>
<ul>
<li>h<a title="http://www.microsoft.com/windows/windowsmedia/howto/articles/introhosting.aspx" href="http://www.microsoft.com/windows/windowsmedia/howto/articles/introhosting.aspx">ttp://www.microsoft.com/windows/windowsmedia/howto/articles/introhosting.aspx</a></li>
<li><a title="http://technet.microsoft.com/en-us/library/cc785105%28WS.10%29.aspx" href="http://technet.microsoft.com/en-us/library/cc785105%28WS.10%29.aspx">http://technet.microsoft.com/en-us/library/cc785105%28WS.10%29.aspx</a></li>
</ul>
<p><font color="#697c83">&#160;</font></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=103&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/11/25/video-streaming-using-windows-media-services-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Customizing Silverlight install experience</title>
		<link>http://bitsofbytes.wordpress.com/2009/11/25/customize-silverlight-install-experience/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/11/25/customize-silverlight-install-experience/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 07:55:00 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/2009/11/25/customize-silverlight-install-experience/</guid>
		<description><![CDATA[If you do not have Silverlight plug-in installed in your browser, the default experience is the Install Microsoft Silverlight message flashed on your screen. The highlighted portion of the html file is actually responsible for this. If you want to customize this message to tell the user why he needs Silverlight and how does it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=82&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p align="justify">If you do not have Silverlight plug-in installed in your browser, the default experience is the Install Microsoft Silverlight message flashed on your screen.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/sl2.png"><img style="display:inline;border-width:0;" title="sl2" border="0" alt="sl2" src="http://bitsofbytes.files.wordpress.com/2009/11/sl2_thumb.png?w=228&#038;h=71" width="228" height="71" /></a></p>
<p align="justify">The highlighted portion of the html file is actually responsible for this. If you want to customize this message to tell the user why he needs Silverlight and how does it improve his viewing experience, you need to fiddle with this code. The same can be achieved also by inserting the &lt;PluginNotInstalledTemplate&gt; piece into the aspx page.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/sl11.png"><img style="display:inline;margin-left:0;margin-right:0;border-width:0;" title="sl1" border="0" alt="sl1" align="left" src="http://bitsofbytes.files.wordpress.com/2009/11/sl1_thumb1.png?w=685&#038;h=305" width="685" height="305" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p>&#160;</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/sl31.png"><img style="display:inline;border-width:0;" title="sl3" border="0" alt="sl3" src="http://bitsofbytes.files.wordpress.com/2009/11/sl3_thumb1.png?w=600&#038;h=82" width="600" height="82" /></a>&#160;</p>
<p>If you already have Silverlight installed, to test this out, just disable the add ons</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/addons21.png"><img style="display:inline;border-width:0;" title="AddOns-2" border="0" alt="AddOns-2" src="http://bitsofbytes.files.wordpress.com/2009/11/addons2_thumb1.png?w=604&#038;h=432" width="604" height="432" /></a> <a href="http://bitsofbytes.files.wordpress.com/2009/11/addons11.png"><img style="display:inline;border-width:0;" title="AddOns-1" border="0" alt="AddOns-1" src="http://bitsofbytes.files.wordpress.com/2009/11/addons1_thumb1.png?w=404&#038;h=294" width="404" height="294" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=82&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/11/25/customize-silverlight-install-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/sl2_thumb.png" medium="image">
			<media:title type="html">sl2</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/sl1_thumb1.png" medium="image">
			<media:title type="html">sl1</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/sl3_thumb1.png" medium="image">
			<media:title type="html">sl3</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/addons2_thumb1.png" medium="image">
			<media:title type="html">AddOns-2</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/addons1_thumb1.png" medium="image">
			<media:title type="html">AddOns-1</media:title>
		</media:content>
	</item>
		<item>
		<title>CREATE AGGREGATE failed because type concatenate does not conform to UDAGG specification due to method &#8216;Accumulate&#8217;.</title>
		<link>http://bitsofbytes.wordpress.com/2009/11/13/create-aggregate-failed-because-type-name-does-not-conform-to-udagg-specification-due-to-method-accumulate/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/11/13/create-aggregate-failed-because-type-name-does-not-conform-to-udagg-specification-due-to-method-accumulate/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 19:06:31 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Sql Server]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/2009/11/13/create-aggregate-failed-because-type-name-does-not-conform-to-udagg-specification-due-to-method-accumulate/</guid>
		<description><![CDATA[Please follow these steps to solve the issue: 1. Open the project in Visual Studio 2. Click on the project properties 3. Go to the Database tab and click on the browse button next to the connection string. You will get the Add Database Reference dialog. 4. Click on Add New Reference 5. In the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=61&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Please follow these steps to solve the issue:</p>
<p>1. Open the project in Visual Studio</p>
<p>2. Click on the project properties</p>
<p>3. Go to the <strong>Database</strong> tab and click on the <strong>browse</strong> button next to the connection string. You will get the <strong>Add Database Reference </strong>dialog.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/step1.png"><img style="display:inline;border:0;" title="Step 1" src="http://bitsofbytes.files.wordpress.com/2009/11/step1_thumb.png?w=410&#038;h=484" border="0" alt="Step 1" width="410" height="484" /></a></p>
<p>4. Click on <strong>Add New Reference</strong></p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/step2.png"><img style="display:inline;border:0;" title="Step 2" src="http://bitsofbytes.files.wordpress.com/2009/11/step2_thumb.png?w=644&#038;h=453" border="0" alt="Step 2" width="644" height="453" /></a></p>
<p>5. In the <strong>New Database Reference</strong> dialog, enter the details for the database where you want to deploy the assembly and create the user defined aggregate.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/step3.png"><img style="display:inline;border:0;" title="Step 3" src="http://bitsofbytes.files.wordpress.com/2009/11/step3_thumb.png?w=323&#038;h=484" border="0" alt="Step 3" width="323" height="484" /></a></p>
<p>6. Now drop and reregister the assembly and then create aggregate function in the database you want.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=61&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/11/13/create-aggregate-failed-because-type-name-does-not-conform-to-udagg-specification-due-to-method-accumulate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/step1_thumb.png" medium="image">
			<media:title type="html">Step 1</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/step2_thumb.png" medium="image">
			<media:title type="html">Step 2</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/step3_thumb.png" medium="image">
			<media:title type="html">Step 3</media:title>
		</media:content>
	</item>
		<item>
		<title>User defined aggregate function in SQL Server 2005</title>
		<link>http://bitsofbytes.wordpress.com/2009/11/13/user-defined-aggregate-function-in-sql-server-2005/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/11/13/user-defined-aggregate-function-in-sql-server-2005/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 18:46:24 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Sql Server]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/2009/11/13/user-defined-aggregate-function-in-sql-server-2005/</guid>
		<description><![CDATA[Find here the list of SQL Server aggregate functions. Create a SQL Server project in Visual Studio 2005 or above. While creating the project provide the database information where you want to register the aggregate function. To create an aggregate function to concatenate the values of a column to a comma separated value, use the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=47&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Find here the list of <a href="http://msdn.microsoft.com/en-us/library/aa258901(SQL.80).aspx">SQL Server aggregate functions</a>.</p>
<p>Create a SQL Server project in Visual Studio 2005 or above. While creating the project provide the database information where you want to register the aggregate function.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/createproject.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="Create Project" src="http://bitsofbytes.files.wordpress.com/2009/11/createproject_thumb.png?w=644&#038;h=441" border="0" alt="Create Project" width="644" height="441" /></a></p>
<p>To create an aggregate function to concatenate the values of a column to a comma separated value, use the following code. Take a look at this <a href="http://www.novicksoftware.com/articles/sql-2005-product-user-defined-aggregate.htm">article</a> for more information on the methods a user defined aggregate must implement.</p>
<table border="1" cellspacing="0" cellpadding="2" width="777">
<tbody>
<tr>
<td width="775" valign="top"><span style="font-family:Courier New;font-size:small;">using System;<br />
using System.Data;<br />
using System.Data.SqlClient;<br />
using System.Data.SqlTypes;<br />
using Microsoft.SqlServer.Server;<br />
using System.IO;<br />
using System.Text;<br />
using System.Runtime.InteropServices; </span><span style="font-family:Courier New;font-size:small;">[Serializable]<br />
[StructLayout(LayoutKind.Sequential)]<br />
[SqlUserDefinedAggregate(<br />
Format.UserDefined, //use clr serialization to serialize the intermediate result<br />
IsInvariantToNulls = true, //optimizer property<br />
IsInvariantToDuplicates = false, //optimizer property<br />
IsInvariantToOrder = false, //optimizer property<br />
MaxByteSize = 8000)]//maximum size in bytes of persisted value </span>
<p>&nbsp;</p>
<p><span style="font-family:Courier New;font-size:small;">public class Concatenate : IBinarySerialize<br />
{<br />
/// &lt;summary&gt;<br />
/// The variable that holds the intermediate result of the concatenation<br />
/// &lt;/summary&gt;<br />
private StringBuilder intermediateResult; </span></p>
<p><span style="font-family:Courier New;font-size:small;"> /// &lt;summary&gt;<br />
/// Initialize the internal data structures<br />
/// &lt;/summary&gt;<br />
public void Init()<br />
{<br />
this.intermediateResult = new StringBuilder();<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> /// &lt;summary&gt;<br />
/// Accumulate the next value, not if the value is null<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;value&#8221;&gt;&lt;/param&gt;<br />
public void Accumulate(SqlInt32 value)<br />
{<br />
if (value.IsNull)<br />
{<br />
return;<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> this.intermediateResult.Append(value.Value.ToString()).Append(&#8216;,&#8217;);<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> /// &lt;summary&gt;<br />
/// Merge the partially computed aggregate with this aggregate.<br />
/// &lt;/summary&gt;<br />
/// &lt;param name=&#8221;other&#8221;&gt;&lt;/param&gt;<br />
public void Merge(Concatenate other)<br />
{<br />
this.intermediateResult.Append(other.intermediateResult);<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> /// &lt;summary&gt;<br />
/// Called at the end of aggregation, to return the results of the aggregation.<br />
/// &lt;/summary&gt;<br />
/// &lt;returns&gt;&lt;/returns&gt;<br />
public SqlString Terminate()<br />
{<br />
string output = string.Empty;<br />
//delete the trailing comma, if any<br />
if (this.intermediateResult != null<br />
&amp;&amp; this.intermediateResult.Length &gt; 0)<br />
{<br />
output = this.intermediateResult.ToString(0, this.intermediateResult.Length &#8211; 1);<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> return new SqlString(output);<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> public void Read(BinaryReader r)<br />
{<br />
intermediateResult = new StringBuilder(r.ReadString());<br />
} </span></p>
<p><span style="font-family:Courier New;font-size:small;"> public void Write(BinaryWriter w)<br />
{<br />
w.Write(this.intermediateResult.ToString());<br />
}<br />
}</span></td>
</tr>
</tbody>
</table>
<p>To enable SQL Server for CLR integration, click <strong>Start &gt; Programs &gt; Microsoft SQL Server 2005 &gt; Configuration Tools &gt; SQL Server Surface Area Configuration </strong></p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration3.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="SQL Server 2005 Surface Area Configuration" src="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration_thumb.png?w=631&#038;h=484" border="0" alt="SQL Server 2005 Surface Area Configuration" width="631" height="484" /></a></p>
<p>Click on Surface Area Configuration for Features, choose the CLR integration and check the Enable CLR integration option.</p>
<p><a href="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration1.png"><img style="display:block;float:none;margin-left:auto;margin-right:auto;border-width:0;" title="SQL Server 2005 Surface Area Configuration" src="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration_thumb1.png?w=631&#038;h=484" border="0" alt="SQL Server 2005 Surface Area Configuration" width="631" height="484" /></a><a href="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration4.png"></a></p>
<p><span style="text-decoration:underline;">How to register the assembly in SQL Server 2005</span></p>
<p>CREATE ASSEMBLY StringUtilities FROM ‘&lt;file path&gt;’<br />
GO<br />
CREATE AGGREGATE CONCAT (@input NVARCHAR(200)) RETURNS NVARCHAR(MAX)<br />
EXTERNAL NAME StringUtilities.Concatenate<br />
GO<br />
GRANT EXEC ON dbo.CONCAT TO PUBLIC<br />
GO</p>
<p><span style="text-decoration:underline;">Usage:</span></p>
<p>For example, below is Table1. A query on Table1 like this <strong>SELECT Column1, Column2, CONCAT(Column3) FROM Table1 GROUPBY Column1, Column2 </strong>would return a result set <strong>A,B,’1,6’. </strong></p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="160" valign="top"></td>
<td width="160" valign="top">Column 1</td>
<td width="160" valign="top">Column 2</td>
<td width="160" valign="top">Column 3</td>
</tr>
<tr>
<td width="160" valign="top">Row 1</td>
<td width="160" valign="top">A</td>
<td width="160" valign="top">B</td>
<td width="160" valign="top">1</td>
</tr>
<tr>
<td width="160" valign="top">Row 2</td>
<td width="160" valign="top">A</td>
<td width="160" valign="top">B</td>
<td width="160" valign="top">6</td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=47&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/11/13/user-defined-aggregate-function-in-sql-server-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/createproject_thumb.png" medium="image">
			<media:title type="html">Create Project</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration_thumb.png" medium="image">
			<media:title type="html">SQL Server 2005 Surface Area Configuration</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/11/sqlserver2005surfaceareaconfiguration_thumb1.png" medium="image">
			<media:title type="html">SQL Server 2005 Surface Area Configuration</media:title>
		</media:content>
	</item>
		<item>
		<title>Applying style to a grid view row</title>
		<link>http://bitsofbytes.wordpress.com/2009/08/10/applying-style-to-a-grid-view-row/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/08/10/applying-style-to-a-grid-view-row/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 12:26:49 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Grid View]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/?p=36</guid>
		<description><![CDATA[In the RowDataBound event of the grid view add this e.Row.Style [ "border-top" ] = &#8220;3px solid Green&#8221;; The code below applies the border style on all borders of the row. e.Row.BorderStyle = BorderStyle.Solid; e.Row.BorderWidth = new Unit(3); e.Row.BorderColor = System.Drawing.Color.Green;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=36&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the RowDataBound event of the grid view add this</p>
<p>e.Row.Style [ "border-top" ] = &#8220;3px solid Green&#8221;;</p>
<p>The code below applies the border style on all borders of the row.</p>
<p>e.Row.BorderStyle = BorderStyle.Solid;<br />
e.Row.BorderWidth = new Unit(3);<br />
e.Row.BorderColor = System.Drawing.Color.Green;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=36&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/08/10/applying-style-to-a-grid-view-row/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>
	</item>
		<item>
		<title>Identity of the check box in a grid view which triggered a post back</title>
		<link>http://bitsofbytes.wordpress.com/2009/08/10/identity-of-the-check-box-in-a-grid-view-which-triggered-a-post-back/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/08/10/identity-of-the-check-box-in-a-grid-view-which-triggered-a-post-back/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 08:54:04 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Grid View]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/?p=32</guid>
		<description><![CDATA[In the checkedchanged event, you can obtain the identity of the check box in the grid view that raised the event. CheckBox check= (CheckBox)sender ; GridViewRow row= (GridViewRow)check.NamingContainer ; int rowIndex = row.RowIndex;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=32&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In the checkedchanged event, you can obtain the identity of the check box in the grid view that raised the event.</p>
<p>CheckBox check= (CheckBox)sender ;<br />
GridViewRow row= (GridViewRow)check.NamingContainer ;<br />
int rowIndex = row.RowIndex;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/32/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/32/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/32/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=32&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/08/10/identity-of-the-check-box-in-a-grid-view-which-triggered-a-post-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>
	</item>
		<item>
		<title>Tool tip for drop down list items</title>
		<link>http://bitsofbytes.wordpress.com/2009/08/09/tool-tip-for-drop-down-list-items/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/08/09/tool-tip-for-drop-down-list-items/#comments</comments>
		<pubDate>Sun, 09 Aug 2009 08:31:45 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/?p=23</guid>
		<description><![CDATA[To provide tool tip for the drop down list items, after binding the drop down list to a data source, loop through the items and set the title attribute. for (int count = 0; count &#60; ddList.Items.Count; count++) { ddList.Items[count].Attributes.Add(&#8220;title&#8221;, ddList.Items[count].Text); } But if you are using an object data source to directly bind your [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=23&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">To provide tool tip for the drop down list items, after binding the drop down list to a data source, loop through the items and set the title attribute.</p>
<p style="text-align:justify;">for (int count = 0; count &lt; ddList.Items.Count; count++)<br />
{<br />
ddList.Items[count].Attributes.Add(&#8220;title&#8221;, ddList.Items[count].Text);<br />
}</p>
<p style="text-align:justify;">But if</p>
<ul>
<li>you are using an object data source to directly bind your drop down</li>
<li> you have too many drop downs in your page</li>
<li>your drop down lists are inside a grid view</li>
</ul>
<p style="text-align:justify;">a better way to implement the same is to have your master page identify the drop down controls and set the title attribute in all the pages using the master page.</p>
<p style="text-align:justify;">protected void ContentPlaceHolder_PreRender(object sender, EventArgs e)<br />
{<br />
BindTooltip(ContentPlaceHolder.Controls);<br />
}</p>
<p style="text-align:justify;">___________________________________________________________</p>
<p style="text-align:justify;">You may put the following code in a Helper / Utility class file.</p>
<p style="text-align:justify;">public static void BindTooltip(System.Web.UI.Page page)<br />
{<br />
if (page == null || page.Form == null)<br />
return;<br />
BindTooltip(page.Form.Controls);<br />
}</p>
<p style="text-align:justify;">___________________________________________________________</p>
<p style="text-align:justify;">public static void BindTooltip(ControlCollection ctrlCol)<br />
{<br />
try<br />
{<br />
if (ctrlCol == null)<br />
return;<br />
for (int count = 0; count &lt; ctrlCol.Count; count++)<br />
{<br />
try<br />
{<br />
Control control = ctrlCol[count];<br />
if (control.HasControls())<br />
{<br />
BindTooltip(control.Controls);<br />
}<br />
else<br />
{<br />
if (control.GetType().IsSubclassOf(typeof(ListControl)))<br />
{<br />
ListControl listControl = (ListControl)control;<br />
BindTooltip(listControl);<br />
}<br />
}<br />
}<br />
catch { }<br />
}<br />
}<br />
catch (Exception ex) { }<br />
}</p>
<p style="text-align:justify;">___________________________________________________________</p>
<p style="text-align:justify;">public static void BindTooltip(ListControl listControl)<br />
{<br />
for (int itemCount = 0; itemCount &lt; listControl.Items.Count; itemCount++)<br />
{<br />
listControl.Items[itemCount].Attributes.Add(&#8220;title&#8221;,listControl.Items[itemCount].Text);<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=23&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/08/09/tool-tip-for-drop-down-list-items/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>
	</item>
		<item>
		<title>Case sensitive search in a SQL query</title>
		<link>http://bitsofbytes.wordpress.com/2009/07/21/case-sensitive-search-in-a-sql-query/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/07/21/case-sensitive-search-in-a-sql-query/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:44:41 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[Sql Server]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/?p=12</guid>
		<description><![CDATA[If you have duplicates in your table and you want a specific entry you might want to do a case sensitive search. Looking up for matching username and passwords might be another instance. Search for a name &#8217;Amy&#8217;  in a table &#8216;Contacts&#8217;  among duplicate entries like &#8216;Amy&#8217;, &#8216;amy&#8217;, &#8216;AMY&#8217;. DECLARE @strName VARCHAR(10) SET @strName = &#8216;Amy&#8217; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=12&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">If you have duplicates in your table and you want a specific entry you might want to do a case sensitive search. Looking up for matching username and passwords might be another instance.</p>
<p style="text-align:justify;">Search for a name &#8217;Amy&#8217;  in a table &#8216;Contacts&#8217;  among duplicate entries like &#8216;Amy&#8217;, &#8216;amy&#8217;, &#8216;AMY&#8217;.</p>
<p>DECLARE @strName VARCHAR(10)<br />
SET @strName = &#8216;Amy&#8217;<br />
SELECT * FROM contact WHERE CAST([Name] AS VARBINARY(10)) = CAST(@strName AS VARBINARY(10))</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=12&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/07/21/case-sensitive-search-in-a-sql-query/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>
	</item>
		<item>
		<title>Primary key reset in SQL Server</title>
		<link>http://bitsofbytes.wordpress.com/2009/07/21/primary-key-reset-in-sql-server/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/07/21/primary-key-reset-in-sql-server/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 12:24:07 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[Sql Server]]></category>

		<guid isPermaLink="false">http://bitsofbytes.wordpress.com/?p=9</guid>
		<description><![CDATA[To reset the primary key of a table with auto primary key set in SQL Server To start from 1 DBCC CHECKIDENT(&#8216;&#60;tablename&#62;&#8217;, RESEED, 0) To start from a specific number, say n DBCC CHECKIDENT(&#8216;&#60;tablename&#62;&#8217;, RESEED, n-1)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=9&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To reset the primary key of a table with auto primary key set in SQL Server</p>
<p>To start from 1</p>
<p>DBCC CHECKIDENT(&#8216;&lt;tablename&gt;&#8217;, RESEED, 0)</p>
<p>To start from a specific number, say n</p>
<p>DBCC CHECKIDENT(&#8216;&lt;tablename&gt;&#8217;, RESEED, n-1)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=9&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/07/21/primary-key-reset-in-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL Server setup issue</title>
		<link>http://bitsofbytes.wordpress.com/2009/07/21/mssql-setup-issue/</link>
		<comments>http://bitsofbytes.wordpress.com/2009/07/21/mssql-setup-issue/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 09:47:58 +0000</pubDate>
		<dc:creator>Minu Nair Khurana</dc:creator>
				<category><![CDATA[Sql Server]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Issue : SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET Framework, and then run SQL Server Setup again. Solution: 1. Open Visual Studio Command Prompt 2. Run this command aspnet_regiis -i -i option installs the version of ASP.NET that is associated with Aspnet_regiis.exe. Click here [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=1&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:justify;">Issue :</p>
<p style="text-align:justify;">SQL Server Setup failed to obtain system account information for the ASPNET account. To proceed, reinstall the .NET Framework, and then run SQL Server Setup again.</p>
<p style="text-align:justify;">Solution:</p>
<p style="text-align:justify;">1. Open Visual Studio Command Prompt</p>
<p style="text-align:justify;">2. Run this command aspnet_regiis -i</p>
<p style="text-align:center;"><img class="aligncenter" title="Visual Studio 2005 Command Prompt" src="http://bitsofbytes.files.wordpress.com/2009/07/ss1.jpg?w=532&#038;h=268" alt="ss" width="532" height="268" /></p>
<p style="text-align:justify;">-i option installs the version of ASP.NET that is associated with Aspnet_regiis.exe. <a href="http://msdn.microsoft.com/en-us/library/k6h9cz8h(VS.80).aspx" target="_blank">Click here for more information on the ASP.Net IIS registration tool</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/bitsofbytes.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/bitsofbytes.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/bitsofbytes.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=bitsofbytes.wordpress.com&amp;blog=8664789&amp;post=1&amp;subd=bitsofbytes&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://bitsofbytes.wordpress.com/2009/07/21/mssql-setup-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/2c78778a13a04bb79f6aa959418502d2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Minu Nair Khurana</media:title>
		</media:content>

		<media:content url="http://bitsofbytes.files.wordpress.com/2009/07/ss1.jpg" medium="image">
			<media:title type="html">Visual Studio 2005 Command Prompt</media:title>
		</media:content>
	</item>
	</channel>
</rss>
