<?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>GranadaCoder C# Tidbits</title>
	<atom:link href="http://granadacoder.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://granadacoder.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Fri, 11 Feb 2011 19:42:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='granadacoder.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>GranadaCoder C# Tidbits</title>
		<link>http://granadacoder.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://granadacoder.wordpress.com/osd.xml" title="GranadaCoder C# Tidbits" />
	<atom:link rel='hub' href='http://granadacoder.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Hello world!</title>
		<link>http://granadacoder.wordpress.com/2011/01/21/hello-world/</link>
		<comments>http://granadacoder.wordpress.com/2011/01/21/hello-world/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 02:28:28 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/?p=1</guid>
		<description><![CDATA[Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=1&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Welcome to <a href="https://wordpress.com/">WordPress.com</a>. This is your first post. Edit or delete it and start blogging!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/1/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/1/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/1/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=1&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2011/01/21/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>Bug in Documentation : Microsoft Access Database Engine 2010 Redistributable</title>
		<link>http://granadacoder.wordpress.com/2010/12/07/bug-in-documentation-microsoft-access-database-engine-2010-redistributable/</link>
		<comments>http://granadacoder.wordpress.com/2010/12/07/bug-in-documentation-microsoft-access-database-engine-2010-redistributable/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 18:15:35 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2010/12/07/bug-in-documentation-microsoft-access-database-engine-2010-redistributable</guid>
		<description><![CDATA[Microsoft Access Database Engine 2010 Redistributable http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&#38;displaylang=en There is a bug in the documentation at the download page. The documentation says:1.If you are the user of an application, consult your application documentation for details on how to use the appropriate &#8230; <a href="http://granadacoder.wordpress.com/2010/12/07/bug-in-documentation-microsoft-access-database-engine-2010-redistributable/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=5&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!848" class="bvMsg">
<h2>Microsoft Access<br />
Database Engine 2010 Redistributable            </h2>
<p><a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&amp;displaylang=en">http://www.microsoft.com/downloads/en/details.aspx?familyid=C06B8369-60DD-4B64-A44B-84B371EDE16D&amp;displaylang=en</a></p>
<p>There is a bug in the documentation at the download page.</p>
<p>The documentation says:<br />1.If you are the user of an application, consult your application<br />
documentation for details on how to use the appropriate driver. </p>
<p>2.If<br />
 you are an application developer using OLEDB, set the Provider argument<br />
 of the ConnectionString property to “Microsoft.ACE.OLEDB.12.0” <br />    If<br />
you are connecting to Microsoft Office Excel data, add “<span style="font-weight:bold;color:rgb(151,72,6);">Excel 14.0</span>” to<br />
the Extended Properties of the OLEDB connection string. </p>
<p>The &quot;<span style="font-weight:bold;color:rgb(151,72,6);">Excel 14.0</span>&quot; is the issue.</p>
<p>It should be &quot;<span style="font-weight:bold;color:rgb(192,0,0);">Excel 12.0</span>&quot;.</p>
<p>Her are a few connection strings to provide full context.</p>
<p>// Old School Jet, been around for a while<br /><span style="color:rgb(151,72,6);font-weight:bold;">&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&#8217;C:\MyOldSchoolFile.xls&#8217;;Extended Properties=&#8217;Excel 8.0;HDR=NO;IMEX=1;&#8217;;&quot;</span><br style="color:rgb(151,72,6);font-weight:bold;" /><br />//Newer version with xslx<br style="color:rgb(151,72,6);font-weight:bold;" /><span style="color:rgb(151,72,6);font-weight:bold;">&quot;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&#8217;C:\MyXlsXFile.xlsx&#8217;;Extended Properties=&#8217;Excel 12.0 Xml;HDR=NO;IMEX=1;&#8217;;&quot;</span><br style="color:rgb(151,72,6);font-weight:bold;" /><br />//Newer version, any xls file<br /><span style="color:rgb(112,48,160);font-weight:bold;">&quot;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&#8217;C:\AlmostAnyExcelVersionFileRunningUnder64BitOS.xls&#8217;;Extended Properties=&#8217;Excel 12.0;HDR=NO;IMEX=1;&#8217;;&quot;</span></p>
<p>Don&#8217;t take the above as absolute truth.  But it should draw attention to the issue (if you&#8217;re experiencing it), and help with some more google (errr. bing) searches.</p>
<p>Here are some other phrases which might lead you here.</p>
<p>The OLE DB provider &quot;Microsoft.Jet.OLEDB.4.0&quot; has not been registered<br />    ( Trying to read an excel file on a 64 bit O/S?  The<span style="font-weight:bold;"> <span style="color:rgb(112,48,160);">purple string</span></span> above should work for you under a 64 bit O/S. )</p>
<p>&quot;Could not find installable ISAM&quot;      <br />    ( This might show up because of the &quot;14.0&quot; vs &quot;12.0&quot; bug mentioned above )</p>
<p>See also:<br />http://stackoverflow.com/questions/2075054/upload-an-excel-file-in-classic-asp-on-windows-2003-x64-using-office-2010-drivers/</p>
<p>http://social.msdn.microsoft.com/Forums/en/adodotnetdataproviders/thread/686d8ebb-0da3-4f0c-bf16-9c650f8dcb32</p>
<p>http://www.connectionstrings.com/excel-2007</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=5&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2010/12/07/bug-in-documentation-microsoft-access-database-engine-2010-redistributable/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>RANT : Hard Coded Security Roles</title>
		<link>http://granadacoder.wordpress.com/2010/12/01/rant-hard-coded-security-roles/</link>
		<comments>http://granadacoder.wordpress.com/2010/12/01/rant-hard-coded-security-roles/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 02:42:19 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2010/12/01/rant-hard-coded-security-roles</guid>
		<description><![CDATA[:::::::::::sigh::::::::::::: If I come across one more hard coded security roles brownfield application, I think I&#8217;m gonna throw my chair out the window. Today, I came across an application that does type-checking to determine security. The code goes something like &#8230; <a href="http://granadacoder.wordpress.com/2010/12/01/rant-hard-coded-security-roles/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=7&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!846" class="bvMsg">
<div style="text-align:center;font-weight:bold;">:::::::::::sigh:::::::::::::</p>
</div>
<p>If I come across one more hard coded security roles brownfield application, I think I&#8217;m gonna throw my chair out the window.</p>
<p>Today, I came across an application that does <span style="font-weight:bold;">type-checking</span> to determine security.</p>
<p>The code goes something like this:</p>
<p>                        AbstractUser user = SomeGetUserMethod(&quot;myname&quot;, &quot;mypassword&quot;); <br />                       /* the above method returns 1 of a few concrete classes which implement AbstractUser */</p>
<p>                        // type-checking time!!<br />                        if (user.GetType() == typeof(BAL.Domain.AdminUser))<br />                        &#123;<br />                            MyWebPage.btnDeleteAllEmployees.Visible = true;<br />                            MyWebPage.btnUpdateMyOwnProfile.Visible = true;<br />                            MyWebPage.btnLogOut.Visible = true;<br />                        &#125;</p>
<p>                        if (user.GetType() ==<br />
typeof(BAL.Domain.NormalUser))<br />
                        &#123;<br />
                            MyWebPage.btnDeleteAllEmployees.Visible = false;<br />
                            MyWebPage.btnUpdateMyOwnProfile.Visible =<br />
true;<br />
                            MyWebPage.btnLogOut.Visible = true;<br />
                        &#125;</p>
<p>or maybe you have seen (bool representing 1 of a few hard coded roles)</p>
<p>                        bool isAdmin = SomeMethodToFigureOutHardCodedRoles();<br />                        bool isNormalUser =<br />
SomeMethodToFigureOutHardCodedRoles();<br />                        if (isAdmin)<br />
                        &#123;<br />
                            MyWebPage.btnDeleteAllEmployees.Visible =<br />
true;<br />
                            MyWebPage.btnUpdateMyOwnProfile.Visible =<br />
true;<br />
                            MyWebPage.btnLogOut.Visible = true;<br />
                        &#125;<br />                        if (isNormalUser)</p>
<p>                        &#123;</p>
<p>                            MyWebPage.btnDeleteAllEmployees.Visible =false ; // NormalUser cannot do this! So hide the button.</p>
<p>                            MyWebPage.btnUpdateMyOwnProfile.Visible =<br />
true;</p>
<p>                            MyWebPage.btnLogOut.Visible = true;</p>
<p>                        &#125;</p>
<p>You know the drill.  </p>
<p>And the pre-project-starts-to-be-constructed discussion goes something like this:<br />&quot;Today, we have 3 roles, lets base all our security off those 3 (hard coded) roles.  Those roles will ~~never~~ change.<br /><br style="font-weight:bold;font-style:italic;" /><span style="font-weight:bold;font-style:italic;">And my thoughts on a finite set of hard coded Role(s).</span><br />That&#8217;s fine for your kid&#8217;s soccer club fan page.<br />That is NOT fine for a professional DotNet developer creating a business application.</p>
<p>I&#8217;ve written an example on how NOT do it (so you can see the pattern clearly).</p>
<p>The problem will always end up being that the 3 (N) number of roles will never be sufficient.<br />A DAY WILL ARRIVE WHEN THE BUSINESS OWNERS WANT A SLIGHTLY DIFFERENT ROLE.<br />They&#8217;ll say that want to &quot;tweak&quot; an existing role, but what they really mean is that they want a new role that is very close to an existing role.<br />But &quot;a tad bit different&quot; is still different.<br />But you (or your &quot;architect&quot; if you want to blame someone else) did not account for this at the beginning of the project.</p>
<p>You can check out:<br /><a href="http://www.lhotka.net/weblog/CommentView,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx">http://www.lhotka.net/weblog/CommentView,guid,9efcafc7-68a2-4f8f-bc64-66174453adfd.aspx</a><br />for a discussion.<br />I can&#8217;t blame just the developer(s).  Microsoft and its &quot;super easy p-easy&quot; &quot;.IsInRole()&quot; method helped propagate this ugliness.<br />And then this kind of code:<br /><span style="font-weight:bold;">[PrincipalPermission(SecurityAction.Demand,Role=&quot;Teller&quot;)]</span><br style="font-weight:bold;" /><br />And I completely agree with the article above and its assertion &quot;<span style="font-style:italic;font-weight:bold;">At runtime, when the user is actually using the application, the roles are entirely meaningless</span>&quot;.<br />Listen people (aka all you developers) ..  software cares about permissions (or &quot;rights&quot;).  Stop coding to roles, start coding to permissions (or rights).</p>
<p>The article above tackles the issue using the existing (available) objects in DotNet.</p>
<p>Here is my custom IPrincipal solution, if the above workaround rubs you the wrong way.<br />While I have &quot;Role&quot; methods, I never use them ***, except for the AllRoles collection, which I use to show humans what role they are in.<br />However, I never show just the Roles, I show the Permissions/Rights, because that is more important.</p>
<p>    public interface IRolesAndRightsPrincipal : System.Security.Principal.IPrincipal<br />    &#123;</p>
<p>        bool IsInRole(System.Guid role);</p>
<p>        bool IsInAnyRole(System.Guid[] roles);</p>
<p>        bool IsInAllRoles(System.Guid[] roles);</p>
<p>        bool HasRight(System.Guid right);</p>
<p>        bool HasAnyRight(System.Guid[] rights);</p>
<p>        bool HasAllRights(System.Guid[] rights);<br />        <br />        ISecurityRoleCollection AllRoles<br />        &#123;<br />            get;<br />        &#125;</p>
<p>        ISecurityRightCollection AllRights<br />        &#123;<br />            get;<br />        &#125;<br />    &#125;</p>
<p>(*** The one place I might use them (though I never have) is backwards compatibility when refactoring an existing application.  If the current application is &quot;all roled up&quot; then that would be a stepping stone to getting to permissions/rights based security.)</p>
<p>You might be saying &quot;What is the HasAnyRight method all about?&quot;</p>
<p>Well, take for instance that you have a menu link called &quot;Manage Employees&quot;.<br />This link will take you to a separate page that allows you to ADDNEW, UPDATE, and/or DELETE an employee.<br />(These are 3 distinct permission(s)/rights(s)).</p>
<p>So how do you decide if you should show this menu link called &quot;Manage Employees&quot;, since its not based on a single permission/right.</p>
<p>And there ya go:  Use the HasAnyRight() method<br />menuItemManageEmployees.Visible = customPrinc.HasAnyRight ( /* throw the Guids here which represent ADDNEW, UPDATE, DELETE */ );<br />You show the link if the use has one (any) of the 3 permissions/rights.<br />Then when you get to that new page, you show buttons/links/etc based on the individual permissions/rights.</p>
<p>Side note, my concrete IRolesAndRightsPrincipal ( adaptly named &quot;RolesAndRightsPrincipal&quot; takes all your roles,rights in its constructor, and then becomes a look-up holder from that point on.  Obviously, if you do on the fly permissions/rights changes, you&#8217;ll have to refresh it.<br />Currently, I just go with a &quot;You gotta re-login to get your fresh permissions/rights&quot;, since the project (almost) never takes away any permissions/rights and seldom changes them.  But you&#8217;ll have to conquer that design decision on your own.<br /><br style="font-weight:bold;" />
<div style="text-align:center;"><span style="font-weight:bold;">:::::::::Call to all Developers::::::::::::</span></div>
<p>If you&#8217;re developing a new project, and starting out with N number of hard coded roles, please stop.  Please stop.  I&#8217;m begging you, please stop.</p>
<p>If you&#8217;re in a brownfield application, then ask your manager for some time to re-factor the security.<br />If your manager is fair, then he/she will find some time for you that does not involve late nights or weekends.<br />If your manager thinks re-factoring (without scope change) is a waste of time since &quot;it works, so its OK&quot;, then find a new job.</p>
<p>This oldie-but-goodie article has the basic meat of a good solution.<br /><a href="http://www.codeproject.com/KB/security/cgsecurity.aspx">http://www.codeproject.com/KB/security/cgsecurity.aspx</a><br />I would take his DDL, update it to your standards, and &quot;framework up&quot; his &quot;Managers&quot;(.cs code).</p>
<p>It is OK to make a Role, but ONLY in the sense to logically group a set of permissions/rights.<br />You should be checking permission(s)/right(s) when you actually are interested in the question <br />                 &quot;Can this IIdentity perform this certain thing?&quot;</p>
<p>Please stop coding hard-coded-roles into your application(s).  <br />The developers who have to maintain your code after you&#8217;ve left will thank you.<br />..</p>
<p>I have also posted an &quot;Anti Example&quot; C# code example <a href="http://www.churchinfomanager.com/code/AntiSecurity01.zip" target="_blank">here</a>.  (&lt;&lt;Right-Click , &quot;Save As&quot; usually works best).</p>
<p>//End Rant</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=7&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2010/12/01/rant-hard-coded-security-roles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>CruiseControl.NET / header.xsl / and DiskSpace</title>
		<link>http://granadacoder.wordpress.com/2010/10/22/cruisecontrol-net-header-xsl-and-diskspace/</link>
		<comments>http://granadacoder.wordpress.com/2010/10/22/cruisecontrol-net-header-xsl-and-diskspace/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 20:42:32 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2010/10/22/cruisecontrol-net-header-xsl-and-diskspace</guid>
		<description><![CDATA[I had a nice situation today.After a code check-in to SVN, CruiseControl.NET reported an error. The culprit?? No more disk space. The error is seen below.  &#34;Out of space&#34; isn&#8217;t mentioned, thus why I am posting this.But it makes sense, &#8230; <a href="http://granadacoder.wordpress.com/2010/10/22/cruisecontrol-net-header-xsl-and-diskspace/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=8&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!845" class="bvMsg"> I had a nice situation today.<br />After a code check-in to SVN, CruiseControl.NET reported an error.</p>
<p><span style="color:rgb(112,48,160);font-weight:bold;">The culprit??</span></p>
<p><font size="5"><span style="font-weight:bold;">No more disk space.</span></font></p>
<p>The error is seen below.  &quot;Out of space&quot; isn&#8217;t mentioned, thus why I am posting this.<br />But it makes sense, the xsl transformation didn&#8217;t have enough disk space to handle the transform output.</p>
<p>There<br />
 was an exception trying to carry out your request.</p>
<h2>Exception Message</h2>
<p>Unable to execute transform: C:\Program Files<br />
(x86)\CruiseControl.NET\webdashboard\xsl\header.xsl<br />(or)<br />Unable to execute transform: C:\Program Files\CruiseControl.NET\webdashboard\xsl\header.xsl</p>
<h2>Exception Full Details</h2>
<div style="white-space:pre-wrap;">ThoughtWorks.CruiseControl.Core.CruiseControlException:<br /> Unable to execute transform: C:\Program Files <br />(x86)\CruiseControl.NET\webdashboard\xsl\header.xsl &#8212;&gt; <br />System.Xml.XmlException: Unexpected end of file while parsing CDATA has <br />occurred. Line 384, position 106.<br />   at System.Xml.XmlTextReaderImpl.Throw(Exception e)<br />   at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type,<br /> Int32&amp; outStartPos, Int32&amp; outEndPos)<br />   at System.Xml.XmlTextReaderImpl.ParseCDataOrComment(XmlNodeType type)<br />   at System.Xml.XmlTextReaderImpl.ParseElementContent()<br />   at System.Xml.XPath.XPathDocument.LoadFromReader(XmlReader reader, <br />XmlSpace space)<br />   at System.Xml.XPath.XPathDocument..ctor(TextReader textReader)<br />   at <br />ThoughtWorks.CruiseControl.Core.Util.XslTransformer.Transform(String <br />input, String xslFilename, Hashtable xsltArgs)<br />   &#8212; End of inner exception stack trace &#8212;<br />   at <br />ThoughtWorks.CruiseControl.Core.Util.XslTransformer.Transform(String <br />input, String xslFilename, Hashtable xsltArgs)<br />   at <br />ThoughtWorks.CruiseControl.Core.Util.HtmlAwareMultiTransformer.Transform(String<br /> input, String[] transformerFileNames, Hashtable xsltArgs)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.Dashboard.PathMappingMultiTransformer.Transform(String<br /> input, String[] transformerFileNames, Hashtable xsltArgs)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.Dashboard.BuildRequestTransformer.Transform(IBuildSpecifier<br /> buildSpecifier, String[] transformerFileNames, Hashtable xsltArgs)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.Dashboard.Actions.MultipleXslReportBuildAction.Execute(ICruiseRequest<br /> cruiseRequest)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ServerCheckingProxyAction.Execute(ICruiseRequest<br /> cruiseRequest)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.BuildCheckingProxyAction.Execute(ICruiseRequest<br /> cruiseRequest)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ProjectCheckingProxyAction.Execute(ICruiseRequest<br /> cruiseRequest)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CruiseActionProxyAction.Execute(IRequest<br /> request)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CachingActionProxy.Execute(IRequest<br /> request)<br />   at <br />ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ExceptionCatchingActionProxy.Execute(IRequest<br /> request)</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=8&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2010/10/22/cruisecontrol-net-header-xsl-and-diskspace/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>Rule of 5 : Better machines for Developers</title>
		<link>http://granadacoder.wordpress.com/2010/10/19/rule-of-5-better-machines-for-developers/</link>
		<comments>http://granadacoder.wordpress.com/2010/10/19/rule-of-5-better-machines-for-developers/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 14:04:07 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2010/10/19/rule-of-5-better-machines-for-developers</guid>
		<description><![CDATA[I have just invented the &#34;Rule of 5&#34; when it comes to justifying a computer upgrade for a developer. 5 compiles an hour (when you&#8217;re actually developing code (like you love to do) and not in some meeting).Each compile saves &#8230; <a href="http://granadacoder.wordpress.com/2010/10/19/rule-of-5-better-machines-for-developers/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=6&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!843" class="bvMsg"><font size="3"> I have just invented the &quot;Rule of 5&quot; when it comes to justifying a computer upgrade for a developer.</p>
<p><span style="color:rgb(255,0,0);font-weight:bold;">5</span> compiles an hour (when you&#8217;re actually developing code (like you love to do) and not in some meeting).<br />Each compile saves <span style="color:rgb(255,0,0);font-weight:bold;">55</span> seconds**.<br /><span style="color:rgb(255,0,0);"></span></font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3"><span style="color:rgb(255,0,0);"></span> hours of development on average a day.  (Hopefully more, but bear with me, I&#8217;m trying to use a &quot;5&quot; here.)<br /></font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3"> days a week.</p>
<p>That is ~115</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;"></span></font><font size="3"> minutes/week of savings.  ~2 hours a week of savings.</p>
<p>Throw into the equation a developer hourly cost of  some kind of middle ground amount of $</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3">0 (and another &quot;</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3">&quot; of course!).</p>
<p>~$95.50 per week of savings per developer.  Each new $1000 machine pay for itself in ~10.5 weeks.</p>
<p><span style="font-weight:bold;color:rgb(112,48,160);">Don&#8217;t forget about the morale factor, which is priceless.</span></p>
<p>=====================================</p>
<p>** </font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5 </span></font><font size="3">seconds compile time savings is an estimate of course.  <br />But I actually conducted a real-world test on a solution I am working on right now.<br />I&#8217;d suggest taking a code base you currently have and perform a simple test.<br />When you build with Msbuild, you only need the code and not the Visual Studio IDE.</p>
<p>Test #1<br />No Previous Build. (no sln.cache file)<br />    E6300 time : 00:01:10.23  ( 1 minute 10 seconds )<br />    Q6400 time : 00:00:14.21  ( 14 seconds )</p>
<p>Test #2<br />Subsequent Build. (sln.cache file exists)<br />    E6300 time : 00:00:51.43  ( 51 seconds )<br />    Q6400 time : 00:00:07.55  ( 7 seconds )</p>
<p>Time savings:<br />No Previous Build. (no sln.cache file)<br />        56 seconds savings.<br />Subsequent Build. (sln.cache file exists)<br />        44 seconds.</p>
<p>Test machines were an older 1.86 Dual Core E6300 vs a 2.4 Quad Core Q6600.  Keep in mind this is an older Quad Core CPU.<br />My personal recommendation (based in price point at the time of writing this in 4th quarter 2010) is the i7-9</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3">0 quad-core.</p>
<p>CPU Benchmarks:<br />http://www.cpubenchmark.net/common_cpus.html</p>
<p>Intel Core i7 9<span style="font-weight:bold;color:rgb(255,0,0);">5</span>0 @ 3.07GHz == 6,275<br />Intel Core2 Quad Q6600 @ 2.40GHz == 2,975<br />Intel Core2 Duo E6300 @ 1.86GHz == 1,113</p>
<p>Why didn&#8217;t I test with a i7-9</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3">0?  <span style="text-decoration:underline;">That&#8217;s the point, I don&#8217;t have one!!</span></p>
<p>Give your developers more Cores !<br />A.  Because the code can compile faster.<br />B.  Because most production machines have (at the very least) 4 CPU&#8217;s/Cores.</p>
<p>__CPU&#8217;s/Cores<br />Because of advances in Parallel Computing, the minimal core number requirement is 2.<br />However, the number of CPU&#8217;s should be closer to the production servers.<br />Recommendation.  4 Cores is recommended because most modern production servers have at least 4 CPU&#8217;s.<br />(The connection here is that with Parallel Computing, developers will be able to actually take advantage of extra processors/cores.</p>
<p>In fact, Microsoft has invented a new namespace in DotNet Framework 4.0 to allow easier coding against this model.<br />System.Threading.Tasks Namespace<br />http://msdn.microsoft.com/en-us/library/system.threading.tasks.aspx</p>
<p>__Visual Studio IDE as it relates to the build process (faster builds = more efficient developer)<br />http://msdn.microsoft.com/en-us/library/bb383805%28v=VS.100%29.aspx<br />Visual Studio 2008 and 2010 can take advantage of systems that have multiple processors, or multiple-core processors. A separate build process is created for each available processor. For example, if the system has four processors, then four build processes are created. MSBuild can process these builds simultaneously, and therefore overall build time is reduced. However, parallel building introduces some changes in how build processes occur. This topic discusses those changes.</p>
<p>Fourth Quarter 2010 : Machine Recommendation (Leveraging Frugality vs Performance)<br />    • Genuine Windows 7 Professional 64-bit<br />    • Intel(R) Core(TM) i7-9</font><font size="3"><span style="color:rgb(255,0,0);font-weight:bold;">5</span></font><font size="3">0 quad-core (or i7-930 quad-core but the newegg difference is only $10 (at the time of writing)<br />    • 6GB DDR3-1333MHz SDRAM<br />    • 1TB RAID 0 (2 x 500GB SATA HDDs)<br />    • 1GB ATI Radeon HD.  A version that supports dual monitors.</p>
<p>Why the i7-950?  There is usually a pretty clear cut &quot;jump&quot; that takes you out of &quot;very, very good and reasonable&quot; to &quot;super great and a lot more expensive&quot;.<br />http://www.cpubenchmark.net/high_end_cpus.html<br />Just start walking &quot;down&quot; until you get to around $300 or under.  the i7-950 (at the time of writing) was the one sitting at the top of the best of the reasonable.  There are processors above the i7-950 that are at the $570 to $1600 range.  Youch!  Of course, by the time I click &quot;publish&quot; that list will become out of date, so you just gotta walk the list until you see the clear cut &quot;very, very good and reasonable&quot; winner.</p>
<p>Supporting URLS:</font>  <font size="3"></p>
<p>http://www.<span style="font-weight:bold;">joelonsoftware</span>.com/articles/fog0000000043.html<br />9. Do you use the best tools money can buy?<br /><span style="font-weight:bold;color:rgb(112,48,160);">Writing code in a compiled language is one of the last things that still can&#8217;t be done instantly on a garden variety home computer. </span>If your compilation process takes more than a few seconds, getting the latest and greatest computer is going to save you time. <br />Debugging GUI code with a single monitor system is painful if not impossible. If you&#8217;re writing GUI code, two monitors will make things much easier.</p>
<p><span style="font-style:italic;color:rgb(0,112,192);">(A personal note about the above comments, people who use Word/Excel don&#8217;t need the superpower, they&#8217;ll do fine with something more mainstream.</span><br style="font-style:italic;color:rgb(0,112,192);" /><span style="color:rgb(0,112,192);font-style:italic;">Code Compile == More Horsepower)</p>
<p>(The other personal note, <span style="font-weight:bold;">Joel On Software</span> makes for some good all around How-To-Develop software well.)</span></p>
<p>http://www.codinghorror.com/blog/2006/08/the-programmers-bill-of-rights.html<br />Every programmer shall have two monitors<br />Every programmer shall have a fast PC<br />Every programmer shall have their choice of mouse and keyboard<br />Every programmer shall have a comfortable chair<br />Every programmer shall have a fast internet connection<br />Every programmer shall have quiet working conditions</p>
<p>//Quote from codinghorror article//<br />It&#8217;s unbelievable to me that a company would pay a developer $60-$100k in salary, yet cripple him or her with terrible working conditions and crusty hand-me-down hardware. This makes no business sense whatsoever. And yet I see it all the time. It&#8217;s shocking how many companies still don&#8217;t provide software developers with the essential things they need to succeed. <br />//End Quote//</p>
<p>And don&#8217;t forget about the dual monitors!</p>
<p>http://www.nytimes.com/2009/01/15/technology/personaltech/15basics.html<br />http://www.nytimes.com/2006/04/20/technology/20basics.html</p>
<p>&quot;Survey after survey shows that whether you measure your productivity in facts researched, alien spaceships vaporized, or articles written, adding an extra monitor will give your output a considerable boost 20 percent to 30 percent, according to a survey by Jon Peddie Research.&quot;</p>
<p>http://research.microsoft.com/en-us/news/features/vibe.aspx<br />Microsoft researchers haven&#8217;t perfected the genie, but they&#8217;ve found a tool that can increase your productivity by 9 to 50 percent and make your work day easier.<br />The researchers conducted user studies that proved the effectiveness of adding a second or even third monitor to your workstation, creating a wide-screen effect. </p>
<p></font><font size="3">Minimum Suggestion: Dual 20&quot; (or 20.5&quot;) Monitors.<br />
Suggestion: Dual 22&quot; (23&quot; or 24&quot;) monitors.</font><br /><font size="3"></p>
<p></font> </p>
<p></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=6&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2010/10/19/rule-of-5-better-machines-for-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>SVN (Subversion) case sensitivity issue with Linux (RedHat) SVN Server and Windows Client</title>
		<link>http://granadacoder.wordpress.com/2010/01/20/svn-subversion-case-sensitivity-issue-with-linux-redhat-svn-server-and-windows-client/</link>
		<comments>http://granadacoder.wordpress.com/2010/01/20/svn-subversion-case-sensitivity-issue-with-linux-redhat-svn-server-and-windows-client/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 22:19:32 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2010/01/20/svn-subversion-case-sensitivity-issue-with-linux-redhat-svn-server-and-windows-client</guid>
		<description><![CDATA[I had a weird subversion (svn) issue today. Here are some clues (for future googlers). &#34;svn: Can&#8217;t open file&#34; &#34;.svn\tmp\text-base&#34; &#34;svn-base&#34; &#34;The system cannot find the file specified&#34;.svn: Can&#8217;t open file .svn\tmp\text-base svn-base The system cannot find the file specified &#8230; <a href="http://granadacoder.wordpress.com/2010/01/20/svn-subversion-case-sensitivity-issue-with-linux-redhat-svn-server-and-windows-client/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=22&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!753" class="bvMsg">I had a weird subversion (svn) issue today.</p>
<p>Here are some clues (for future googlers).</p>
<p>&quot;svn: Can&#8217;t open file&quot; &quot;.svn\tmp\text-base&quot; &quot;svn-base&quot; &quot;The system cannot find the file specified&quot;.<br />svn: Can&#8217;t open file .svn\tmp\text-base svn-base The system cannot find the file specified</p>
<p>After backtracking, here is what happened.</p>
<p>I had a file (a compiled dll) in source control.<br />I found out that I had a non-signed version of the dll (DotNet assembly).<br />I found the &quot;signed version&quot; of the dll.  I wanted to replace the unsigned version with the signed version.</p>
<p>So I replaced the existing file (in my local directory) with the signed version.</p>
<p>There was a slight issue with the file name.</p>
<p>The unsigned version was <br />MyAssemb<span style="color:rgb(112,48,160);">ly</span>.dll</p>
<p>The signed version was ~~~slightly off (case wise):<br />MyAssemb<span style="color:rgb(112,48,160);">LY</span>.dll </p>
<p>(The file names are obviously for demonstration only).</p>
<p>So when I overwrote MyAssembly.dll with MyAssembLY.dll, it was fine (local windows directory).<br />The files were &quot;Committed to Subversion&quot;.</p>
<p>(FYI, You can ignore the &quot;signed&quot; vs &quot;unsigned&quot; issue I cite above if you&#8217;re having this issue&#8230;..<br />the issue was not<br />
related to signed/unsigned, but rather cAsE SenSiTiviTy of the replacement file).</p>
<p>Ok&#8230;so I thought everything was cool.  WRONG.</p>
<p>The next time my continuous integration ran, I got the error message seen above.  (&quot;svn: Can&#8217;t open file).</p>
<p>I mimicked the command line call ( to take the CI environment out of the equation).</p>
<p>&quot;C:\Program Files\CollabNet\Subversion Client\svn.exe&quot; checkout https://www.something.com/SomeFolder SomeLocalFolder &#8211;username myUserName &#8211;non-interactive &#8211;no-auth-cache</p>
<p>and got the same error message. </p>
<p>The fix?</p>
<p>I deleted all the files in the folder via the repository browser.  (Aka, cleared them OUT of svn).<br />I uploaded the signed assembly.  (I did this via &quot;Add&quot; and &quot;Commit&quot; with the local tortoise shell).</p>
<p>Please note this is NOT ideal, because of revision history.  I was lucky in that for this branch, history retention was not a priority.</p>
<p>Now the case of the files on the server (svn) matched the case of my (signed) assemblies(dll&#8217;s).</p>
<p>Here is the thread that gave me the clue:<br />http://issues.apache.org/jira/browse/STDCXX-14</p>
<p>Server:  CollabNet for RedHat SVN Server.  (Aka, a case sensitive environment)<br />Client:  CollabNet svn client for Windows.</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=22&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2010/01/20/svn-subversion-case-sensitivity-issue-with-linux-redhat-svn-server-and-windows-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>Sql Server Data to a Jet Database</title>
		<link>http://granadacoder.wordpress.com/2009/12/22/sql-server-data-to-a-jet-database/</link>
		<comments>http://granadacoder.wordpress.com/2009/12/22/sql-server-data-to-a-jet-database/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 16:16:50 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2009/12/22/sql-server-data-to-a-jet-database</guid>
		<description><![CDATA[Ok.  This is another &#34;not rocket science&#34; blog.But if/when you need it, it is good to know the syntax. Basically, this will run a tsql query and dump the data into a jet database.  (&#34;access database&#34; is another way to &#8230; <a href="http://granadacoder.wordpress.com/2009/12/22/sql-server-data-to-a-jet-database/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=23&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!719" class="bvMsg">Ok.  This is another &quot;not rocket science&quot; blog.<br />But if/when you need it, it is good to know the syntax.</p>
<p>Basically, this will run a tsql query and dump the data into a jet database.  (&quot;access database&quot; is another way to say it, but I prefer to call the program &quot;Microsoft Access&quot; and then call the database file (.mdb) a jet database to make the distinction clear).</p>
<p>The syntax sugar is below.<br />However, one key thing to know is that you need to have a .mdb file created ~~before running the code.<br />Aka, you&#8217;ll need to manually make an .mdb and add tables/columns which matches your tsql-select query(ies).</p>
<p>The <del>attached zip</del> (zip file coming soon!) file give you the tsql code and a sample jet database (as a complete example).</p>
<p>Here are the key lines.</p>
<p>&#8211;Note, the &#8230; before &quot;<span style="color:rgb(112,48,160);">PersonTable</span>&quot; is there on purpose.<br />DELETE<br />FROM OPENDATASOURCE(&#8216;Microsoft.Jet.OLEDB.4.0&#8242;,<br />    &#8216;Data Source=C:\WUWUTemp\JetDatabaseExportExample\person.mdb;&#8217;)<br />    &#8230;<span style="color:rgb(112,48,160);">PersonTable</span></p>
<p>INSERT INTO OPENROWSET (&#8216;Microsoft.Jet.OLEDB.4.0&#8242;, &#8216;C:\WUWUTemp\JetDatabaseExportExample\person.mdb&#8217;;'Admin&#8217;;&#8221;, <br />&#8216;Select LastName , FirstName From PersonTable&#8217;)<br />SELECT LastName , FirstName<br />From dbo.SomeRealTable;</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=23&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2009/12/22/sql-server-data-to-a-jet-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>BCP Export</title>
		<link>http://granadacoder.wordpress.com/2009/12/22/bcp-export/</link>
		<comments>http://granadacoder.wordpress.com/2009/12/22/bcp-export/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 15:49:34 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2009/12/22/bcp-export</guid>
		<description><![CDATA[I found this one in some old code, and decided to post it. Not rocket science, but very handy sometimes. The below is a &#34;fixed width&#34; export, using bcp. The syntax sugar for &#34;fixed-width&#34; is the cast to a char(SomeNumber) &#8230; <a href="http://granadacoder.wordpress.com/2009/12/22/bcp-export/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=21&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!718" class="bvMsg">I found this one in some old code, and decided to post it.</p>
<p>Not rocket science, but very handy sometimes.</p>
<p>The below is a &quot;fixed width&quot; export, using bcp.</p>
<p>The syntax sugar for &quot;fixed-width&quot; is the cast to a <span style="color:rgb(0,176,80);font-weight:bold;">char(SomeNumber)</span> where SomeNumber is your width of course.<br />
The other gotcha is the <span style="font-weight:bold;">-t</span> argument (with nothing specified) which overrides the default column delimiter of a tab.  Aka, below I&#8217;m specifying nothing for the -t argument so the default &#8216;tab&#8217; does not get inserted.  If you want to see how it works, specify the -t argument like this:<br />-t:***:<br />Then it will be obvious what the -t argument does.  Remember, there is a default value, so if you don&#8217;t want the default, you must override it.</p>
<p>The other syntax sugar is that there is no space after the -S argument.  As seen below (<span style="color:rgb(112,48,160);font-weight:bold;">-S<span style="color:rgb(151,72,6);">MyServerName\MyInstanceName).</span></span></p>
<p><span style="color:rgb(112,48,160);font-weight:bold;">bcp.exe  &quot;SELECT cast(LastName as <span style="color:rgb(0,176,80);">char(50)</span>) , cast(FirstName as <span style="color:rgb(0,176,80);">char(50)</span>) , cast(MiddleName as <span style="color:rgb(0,176,80);">char(50)</span>) , cast(Suffix as </span><span style="color:rgb(112,48,160);font-weight:bold;"><span style="color:rgb(0,176,80);">char(50)</span></span><span style="color:rgb(112,48,160);font-weight:bold;">) FROM MyAdventureWorksDB.Person.Person ORDER BY NEWID()&quot; queryout PeopleRock.txt -c -t -T -S<span style="color:rgb(151,72,6);">MyServerName\MyInstanceName</span></span></p>
<p>MyAdventureWorksDB is the name of the database.<br />Person (the first one) is the schema.  <br />Person (the second one) is the table.</p>
<p>I am using the AdventureWorks2008 database I got from codeplex.</p>
<p>The Order by NEWID() is completely useless and can be removed.  However, if I&#8217;m testing the export (most likely importing the data through another system) I like to leave that in so I don&#8217;t get the same data or same order every time when I am testing the output.</p>
<p>The other command line argument of interest is <span style="color:rgb(112,48,160);font-weight:bold;">queryout</span>.  I&#8217;ll let you see what that one does in the <span style="color:rgb(192,0,0);font-weight:bold;">microsoft url below.</span><span style="color:rgb(112,48,160);font-weight:bold;"></span></p>
<p>Here is the full bcp command line list:<br /><span style="color:rgb(192,0,0);font-weight:bold;">http://msdn.microsoft.com/en-us/library/ms162802.aspx</span></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=21&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2009/12/22/bcp-export/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
		<item>
		<title>CTE Running Total Example</title>
		<link>http://granadacoder.wordpress.com/2009/08/13/cte-running-total-example/</link>
		<comments>http://granadacoder.wordpress.com/2009/08/13/cte-running-total-example/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 21:17:15 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2009/08/13/cte-running-total-example</guid>
		<description><![CDATA[  I happened across a CURSOR based &#34;Running Total&#34; example on the web today.Everyone with whom I work knows I detest Cursors in TSQL.  So I coded up (one) alternate solution. Below is (one variation) of a &#8216;Running Total&#8217; solution &#8230; <a href="http://granadacoder.wordpress.com/2009/08/13/cte-running-total-example/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=20&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!595" class="bvMsg">
<div><font size="2"></p>
<p> </p>
<p>I happened across a CURSOR based &quot;Running Total&quot; example on the web today.<br />Everyone with whom I work knows I detest Cursors in TSQL.  <img src="http://shared.live.com/jPo!NIsz05NfR1dpCDDJ8Q/emoticons/smile_baringteeth.gif" /></p>
<p>So I coded up (one) alternate solution.</p>
<p>Below is (one variation) of a &#8216;Running Total&#8217; solution using a CTE.<br /><font color="#008000"><a href="http://technet.microsoft.com/en-us/library/ms175972.aspx">http://technet.microsoft.com/en-us/library/ms175972.aspx</a>  (CTE Link)</font></p>
<p><font color="#008000">&#8212;&#8212;&#8212;&#8211;START TSQL</font></p>
</p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Use</font></font><font size="2"><font color="#000000"> Northwind</font></p>
<p>GO</p>
<p> </p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>declare</p>
<p></font></font><font color="#000000" size="2"> @CustomerID </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">varchar</font></font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font color="#000000" size="2">6</font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>declare</p>
<p></font></font><font color="#000000" size="2"> @BeginDate </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">datetime</font></font><font size="2"><font color="#000000"> </font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>declare</p>
<p></font></font><font color="#000000" size="2"> @EndDate </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">datetime</p>
<p>select</p>
<p></font></font><font color="#000000" size="2"> @CustomerID </font><font color="#808080" size="2"><font color="#808080" size="2">=</font></font><font color="#000000" size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">select</font></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">top</font></font><font color="#000000" size="2"> 1 CustomerID </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">from</font></font><font color="#000000" size="2"> dbo</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font color="#000000" size="2">Orders </font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>select</p>
<p></font></font><font color="#000000" size="2"> @BeginDate </font><font color="#808080" size="2"><font color="#808080" size="2">=</font></font><font color="#000000" size="2"> </font><font color="#ff0000" size="2"><font color="#ff0000" size="2">&#8217;01/01/1900&#8242;</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>select</p>
<p></font></font><font color="#000000" size="2"> @EndDate </font><font color="#808080" size="2"><font color="#808080" size="2">=</font></font><font color="#000000" size="2"> </font><font color="#ff0000" size="2"><font color="#ff0000" size="2">&#8217;12/31/2010&#8242;</p>
<p> </p>
<p></font></font><font color="#808080" size="2"><font color="#808080" size="2"></p>
<p>;</p>
<p></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>WITH</p>
<p></font></font><font color="#000000" size="2"> MyCTE </font><font color="#008000" size="2"><font color="#008000" size="2">&#8211; http://technet.microsoft.com/en-us/library/ms175972.aspx</font></font><font color="#808080" size="2"><font color="#808080" size="2"></p>
<p>(</font></font><font color="#000000" size="2"> ShipName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">ShipAddress</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">ShipCity</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">ShipRegion</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">ShipPostalCode</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">ShipCountry</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">CustomerID</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">CustomerName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font color="#000000" size="2">[Address]</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"></p>
<p>City</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Region</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">PostalCode</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Country</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Salesperson</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderID</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">RequiredDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShippedDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipperName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"></p>
<p>ProductID</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ProductName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">UnitPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Quantity</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Discount</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ExtendedPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Freight</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ROWID</font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">AS</font></font><font color="#808080" size="2"><font color="#808080" size="2"></p>
<p>(</p>
<p></font></font><font size="2"></p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">SELECT</font></font><font size="2"></p>
<p>ShipName</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipAddress</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipCity</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipRegion</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipPostalCode</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipCountry</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">CustomerID</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">CustomerName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">[Address]</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"></p>
<p>City</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Region</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">PostalCode</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Country</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Salesperson</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderID</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">RequiredDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShippedDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ShipperName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"></p>
<p>ProductID</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ProductName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">UnitPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Quantity</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Discount</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ExtendedPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Freight</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> </font><font color="#ff00ff" size="2"><font color="#ff00ff" size="2">ROW_NUMBER</font></font><font color="#808080" size="2"><font color="#808080" size="2">()</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">OVER</font></font><font size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ORDER</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">BY</font></font><font size="2"> OrderDate </font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> ProductName </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">ASC</font></font><font size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"> ROWID</p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">FROM</font></font><font size="2"> </p>
<p>dbo</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">Invoices inv </font><font color="#008000" size="2"><font color="#008000" size="2">&#8211; &quot;Invoices&quot; is a VIEW, FYI</font></font><font size="2"></p>
<p></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">where</font></font><font size="2"> </p>
<p>inv</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">CustomerID </font><font color="#808080" size="2"><font color="#808080" size="2">=</font></font><font size="2"> @CustomerID</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">and</font></font><font size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font size="2">inv</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">OrderDate </font><font color="#808080" size="2"><font color="#808080" size="2">between</font></font><font size="2"> @BeginDate </font><font color="#808080" size="2"><font color="#808080" size="2">and</font></font><font size="2"> @EndDate</font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"></p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2"></p>
<p>)</p>
<p></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font></font><font size="2"><font color="#000000"> </font></p>
<p></font><font color="#008000" size="2"><font color="#008000" size="2">/*</p>
<p>ShipName,ShipAddress,ShipCity,ShipRegion,ShipPostalCode,ShipCountry,CustomerID,CustomerName,[Address],</p>
<p>City,Region,PostalCode,Country,Salesperson,OrderID,OrderDate,RequiredDate,ShippedDate,ShipperName,</p>
<p>ProductID,ProductName,UnitPrice,Quantity,Discount,ExtendedPrice,Freight,</p>
<p>*/</p>
<p></font></font><font size="2"></p>
</p>
<p></font><font color="#008000" size="2"><font color="#008000" size="2">&#8211;trim the list down a little for the final output</font></font><font size="2"></p>
<p>CustomerID</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Salesperson</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderID</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">OrderDate</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ProductName</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">UnitPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Quantity</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Discount</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">ExtendedPrice</font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2">Freight</font><font color="#808080" size="2"><font color="#808080" size="2">,</p>
<p> </p>
<p></font></font><font size="2"></p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font size="2">ExtendedPrice </font><font color="#808080" size="2"><font color="#808080" size="2">+</font></font><font size="2"> Freight</font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"> ComputedTotal</p>
<p></font><font color="#008000" size="2"><font color="#008000" size="2">&#8211;The below line is the &quot;trick&quot;. I reference the above CTE, but only get data that is less than or equal to the row that I am on (outerAlias.ROWID)</font></font><font size="2"></p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2">Select</font></font><font size="2"> </font><font color="#ff00ff" size="2"><font color="#ff00ff" size="2">SUM</font></font><font size="2"> </font><font color="#808080" size="2"><font color="#808080" size="2">(</font></font><font size="2">ExtendedPrice </font><font color="#808080" size="2"><font color="#808080" size="2">+</font></font><font size="2"> Freight</font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">from</font></font><font size="2"> MyCTE innerAlias </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">where</font></font><font size="2"> innerAlias</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">ROWID </font><font color="#808080" size="2"><font color="#808080" size="2">&lt;=</font></font><font size="2"> outerAlias</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font size="2">ROWID </font><font color="#808080" size="2"><font color="#808080" size="2">)</font></font><font size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"> RunningTotal</p>
<p></font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> ROWID </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"> ROWID_SHOWN_FOR_KICKS </font><font color="#808080" size="2"><font color="#808080" size="2">,</font></font><font size="2"> OrderDate </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">as</font></font><font size="2"> OrderDateASecondTimeForConvenience</font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>FROM</p>
<p></font></font><font size="2"><font color="#000000"> MyCTE outerAlias</font></font><font color="#008000" size="2"><font color="#008000" size="2"></p>
<p>&#8211;Two Order By Options</p>
<p>&#8211;ORDER BY outerAlias.OrderDate , ProductName &#8212; &lt;&lt; Whatever the ORDER BY is here, should match the &quot;ROW_NUMBER() OVER ( ORDER BY ________ ASC )&quot; statement inside the CTE</p>
<p></font></font><font color="#0000ff" size="2"><font color="#0000ff" size="2"></p>
<p>ORDER</p>
<p></font></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2"><font color="#0000ff" size="2">BY</font></font><font color="#000000" size="2"> outerAlias</font><font color="#808080" size="2"><font color="#808080" size="2">.</font></font><font color="#000000" size="2">ROWID </font><font color="#008000" size="2"><font color="#008000" size="2">&#8211; &lt;&lt; Or, to keep is more &quot;trim&quot;, ORDER BY the ROWID, which will of course be the same as the &quot;ROW_NUMBER() OVER ( ORDER BY&quot; inside the CTE</p>
<p> </p>
<p></font></font></div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=20&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2009/08/13/cte-running-total-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>

		<media:content url="http://shared.live.com/jPo!NIsz05NfR1dpCDDJ8Q/emoticons/smile_baringteeth.gif" medium="image" />
	</item>
		<item>
		<title>SQLCMD (Simple Example)</title>
		<link>http://granadacoder.wordpress.com/2009/07/07/sqlcmd-simple-example/</link>
		<comments>http://granadacoder.wordpress.com/2009/07/07/sqlcmd-simple-example/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 14:35:40 +0000</pubDate>
		<dc:creator>granadacoder</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://granadacoder.wordpress.com/2009/07/07/sqlcmd-simple-example</guid>
		<description><![CDATA[    Download example HERE. (&#60;&#60; Right-click. &#34;Save (Target) As&#34; usually works best). If I haven&#8217;t mentioned it before, thank you Microsoft for the sqlcmd.exe utility. If you are new to sqlcmd or new to the concept of repeatability, below &#8230; <a href="http://granadacoder.wordpress.com/2009/07/07/sqlcmd-simple-example/">Continue reading <span class="meta-nav">&#8594;</span></a><img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=26&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!A68482B9628A842A!583" class="bvMsg">
<div><font size="2"><font face="Arial"></font></font> </div>
<div> </div>
<div><font face="Arial" size="2">Download example <a href="http://www.churchinfomanager.com/code/SQLCMDDemo01.zip" target="_blank">HERE</a>. (&lt;&lt; Right-click. &quot;Save (Target) As&quot; usually works best).</font></div>
<p><font size="2"><font face="Arial"></p>
<div>If I haven&#8217;t mentioned it before, thank you Microsoft for the sqlcmd.exe utility.</div>
<div>If you are new to sqlcmd or new to the concept of repeatability, below is a simple example.<br />It creates 3 databases that are exactly the same except for the database-name.</div>
<div>Can you say &quot;repeatable&quot; (as in every-single-time-repeatable-and-dependable)?</div>
<div>If you&#8217;re still using the GUI in Sql Server Management Studio and doing a &quot;Right-Click&quot;/&quot;Add Database&quot; for than anything for casual development, then please stop.</div>
<div>It is not repeatable.  It does not promote repeatability for &quot;D-DAY&quot; (that&#8217;s what I call deployment-day).  </div>
<div> </div>
<div>My motto:<br />If you cannot deploy your code, your code and hard-work is essentially worthless.</div>
<div></div>
<p></font></font></p>
<div><font size="2"><font face="Arial"></font></font> </div>
<div><font size="2"><font face="Arial">The demo is simple.  A database, one table, and 2 stored procedures.  But the skeleton is there.</font></font></div>
<div><font size="2"><font face="Arial"></font></font> </div>
<div><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">The example zip file is a demo example of creating a basic “OrganizationDB” (OrganizationDB01,</span></font> <font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">OrganizationDB02,</span></font> <font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">and OrganizationDB03).</span></font></div>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">Again, this is a sqlcmd.exe example of using $(<strong>Variable</strong>)’s to deploy databases….which emphasizes <strong>repeatability</strong> but with <strong>configurability </strong>as well.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">Instructions:</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">Unzip the files……….read the README.txt file (the top portion contains setup information).</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">If you have &quot;.\SqlExpress&quot; setup as your development environment, you should be able to just click:<br /></span></font><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"><font color="#333399"><span style="font-weight:bold;color:#333399;">RebuildDatabaseMaster_AllThree.bat<br /></span></font></span></font><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">and it should just work.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"><br />Look at the <font color="purple"><span style="color:purple;">gif screenshot (in the zip)</span></font>, and compare to your database.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"></span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">Then you can look at the README.txt file for explanation about what is happening.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">There are also output log files you can look at (mentioned in the README.txt file) which will provide clues if anything does not work.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;">After you get it down, you’re essentially (always) one copy/paste/edit (the variable file) and a second copy/paste/edit (the .bat file) away from deploying a new database.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"></span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"> </span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"> ISQLW OSQL &lt;&lt; These are the early versions of this tool, FYI.</span></font></p>
<p><font face="Arial" size="2"><span style="font-size:10pt;font-family:Arial;"> </span></font></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/granadacoder.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/granadacoder.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/granadacoder.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=granadacoder.wordpress.com&amp;blog=19323713&amp;post=26&amp;subd=granadacoder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://granadacoder.wordpress.com/2009/07/07/sqlcmd-simple-example/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/23cd312d7c0423f5ea37d1153d762b3f?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">granadacoder</media:title>
		</media:content>
	</item>
	</channel>
</rss>
