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

<channel>
	<title>Eric Fickes &#187; microsoft</title>
	<atom:link href="http://ericfickes.com/category/microsoft/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericfickes.com</link>
	<description>Design minded Internet Programmer</description>
	<lastBuildDate>Fri, 28 Oct 2011 04:14:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>iBoth</title>
		<link>http://ericfickes.com/2011/10/iboth/</link>
		<comments>http://ericfickes.com/2011/10/iboth/#comments</comments>
		<pubDate>Thu, 06 Oct 2011 04:40:11 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[apple]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=2194</guid>
		<description><![CDATA[I&#8217;m a PC, but I&#8217;m also a MAC. Thank you Steve.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a <a title="Microsoft.com" href="http://www.microsoft.com" target="_blank">PC</a>, but I&#8217;m also a <a title="MacBook Pro" href="http://www.apple.com/macbookpro/" target="_blank">MAC</a>.</p>
<p>Thank you Steve.<br />
</p>
<div id="attachment_2195" class="wp-caption alignnone" style="width: 716px"><a href="http://ericfickes.com/wp-content/uploads/2011/10/stevejobs.png" style="float:left;" rel="lightbox[2194]"><img class="size-full wp-image-2195 " title="stevejobs" src="http://ericfickes.com/wp-content/uploads/2011/10/stevejobs.png" alt="Steve Jobs 1955 - 2011" width="706" height="644" style="float:left;" /></a><p class="wp-caption-text">Steve Jobs 1955 - 2011</p></div>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/10/iboth/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An aggregate may not appear in the set list of an UPDATE statement</title>
		<link>http://ericfickes.com/2011/02/an-aggregate-may-not-appear-in-the-set-list-of-an-update-statement/</link>
		<comments>http://ericfickes.com/2011/02/an-aggregate-may-not-appear-in-the-set-list-of-an-update-statement/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 06:43:00 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1998</guid>
		<description><![CDATA[Ever seen the error &#8220;An aggregate may not appear in the set list of an UPDATE statement&#8221; when working with SQL Server?  I ran into this one recently after trying to put a COUNT in an UPDATE statement.  I was rewriting &#8230; <a href="http://ericfickes.com/2011/02/an-aggregate-may-not-appear-in-the-set-list-of-an-update-statement/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever seen the error &#8220;An aggregate may not appear in the set list of an UPDATE statement&#8221; when working with SQL Server?  I ran into this one recently after trying to put a COUNT in an UPDATE statement.  I was rewriting some legacy code to use a stored procedure, and it turned out to be the perfect case for a <a title="Read about Temporary Tables on MSDN" href="http://msdn.microsoft.com/en-us/library/ms177399.aspx" target="_blank">Temporary Table</a>.</p>
<p>Instead of boring you with a work scenario, let&#8217;s take a simpler one that uses the <a title="Download Microsoft's AdventureWorks database from this site so you can play along at home" href="http://msftdbprodsamples.codeplex.com/releases/view/37109" target="_blank">AdventureWorks</a> database.  This example will create a list of sales people, total order count for each person, and store this list a single table variable to be used as the final data table.</p>
<p>Should be three simple steps right?</p>
<h2>1. Create @Table variable</h2>
<pre class="brush: sql; title: ; notranslate">
DECLARE @SalesPeople TABLE
(
  EmployeeID int NOT NULL,
  SalesPersonID int NOT NULL,
  FullName varchar(200) NOT NULL,
  Title varchar(200) NOT NULL,
  sales_count int NULL default 0
)
</pre>
<h2>2. INSERT sales people into @Table</h2>
<pre class="brush: sql; title: ; notranslate">
-- HACKISH : Match SalesPersonID to EmployeeID, and fill @SalesPeople
INSERT INTO @SalesPeople
( EmployeeID, SalesPersonID, FullName, Title )
SELECT	e.EmployeeID, sp.SalesPersonID,
		c.FirstName + ' ' + c.LastName as FullName,
		e.Title
FROM	Sales.SalesPerson sp,
		HumanResources.Employee e,
		Person.Contact c
WHERE	sp.SalesPersonID = e.EmployeeID
AND		e.ContactID = c.ContactID
</pre>
<h2>3. UPDATE @Table with COUNT</h2>
<pre class="brush: sql; title: ; notranslate">
UPDATE	@SalesPeople
SET
	sales_count = COUNT( soh.SalesOrderID )
FROM	@SalesPeople sp, Sales.SalesOrderHeader soh
WHERE EXISTS (
	SELECT DISTINCT SalesPersonID FROM @SalesPeople WHERE SalesPersonID = soh.SalesPersonID
)
AND	sp.SalesPersonID = soh.SalesPersonID
</pre>
<div id="attachment_2004" class="wp-caption alignnone" style="width: 775px"><a style="font-weight: normal;" href="http://ericfickes.com/wp-content/uploads/2011/02/aggregate-error.png" rel="lightbox[1998]"><img title="aggregate-error" src="http://ericfickes.com/wp-content/uploads/2011/02/aggregate-error.png" alt="" width="765" height="187" /></a><p class="wp-caption-text">Not COUNT allowed in an UPDATE SET statement</p></div>
<p>The third step is where the original error comes in, so let&#8217;s update this to four steps and see how a Table Variable gets through this.</p>
<h2>1 &amp; 2 &#8211; Repeat from above</h2>
<h2>3. Create Table Variable of order counts</h2>
<pre class="brush: sql; title: ; notranslate">
SELECT	soh.SalesPersonID, COUNT( soh.SalesOrderID ) AS sales_count
INTO	#SalesOrderCounts
FROM	Sales.SalesOrderHeader soh
WHERE EXISTS (
	SELECT DISTINCT SalesPersonID FROM @SalesPeople WHERE SalesPersonID = soh.SalesPersonID
)
GROUP BY soh.SalesPersonID
</pre>
<h2>4. Update @Table with order counts</h2>
<pre class="brush: sql; title: ; notranslate">
UPDATE	@SalesPeople
SET		sales_count = tmp.sales_count
FROM	@SalesPeople sp, #SalesOrderCounts tmp
WHERE	sp.SalesPersonID = tmp.SalesPersonID
</pre>
<p>And here&#8217;s the full script from start to finish with the table variable in use.</p>
<pre class="brush: sql; title: ; notranslate">
-- Master table of sales people
DECLARE @SalesPeople TABLE
(
  EmployeeID int NOT NULL,
  SalesPersonID int NOT NULL,
  FullName varchar(200) NOT NULL,
  Title varchar(200) NOT NULL,
  sales_count int NULL default 0
)

-- Match SalesPersonID to EmployeeID, and fill @SalesPeople
INSERT INTO @SalesPeople
( EmployeeID, SalesPersonID, FullName, Title )
SELECT	e.EmployeeID, sp.SalesPersonID,
		c.FirstName + ' ' + c.LastName as FullName,
		e.Title
FROM	Sales.SalesPerson sp, HumanResources.Employee e, Person.Contact c
WHERE	sp.SalesPersonID = e.EmployeeID
AND		e.ContactID = c.ContactID

-- put sales counts into the other kind of #tableVariable
SELECT	soh.SalesPersonID, COUNT( soh.SalesOrderID ) AS sales_count
INTO	#SalesOrderCounts
FROM	Sales.SalesOrderHeader soh
WHERE EXISTS (
	SELECT DISTINCT SalesPersonID FROM @SalesPeople WHERE SalesPersonID = soh.SalesPersonID
)
GROUP BY soh.SalesPersonID

-- Update our master @table with data from #tableVariable
UPDATE	@SalesPeople
SET		sales_count = tmp.sales_count
FROM	@SalesPeople sp, #SalesOrderCounts tmp
WHERE	sp.SalesPersonID = tmp.SalesPersonID

-- dump the results
SELECT	FullName, Title, sales_count
FROM	@SalesPeople

-- cleanup
drop table #SalesOrderCounts
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/02/an-aggregate-may-not-appear-in-the-set-list-of-an-update-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Injecting javascript into asp.net via code</title>
		<link>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/</link>
		<comments>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 04:13:50 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[aspx]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[Literal]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[postback]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1903</guid>
		<description><![CDATA[Microsoft has a great MSDN article on using javascript along asp.net, but they didn&#8217;t mention a technique I like to use, put it in a Literal control.  While there are many ways to add javascript to a page, I find &#8230; <a href="http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Microsoft has a great MSDN article on <a title="Several other techniques for using javascript with asp.net" href="http://msdn.microsoft.com/en-us/library/aa479011.aspx" target="_blank">using javascript along asp.net</a>, but they didn&#8217;t mention a technique I like to use, put it in a <a title="ASP.NET Literal Class" href="http://msdn.microsoft.com/en-us/library/f0aw4d5w.aspx" target="_blank">Literal</a> control.  While there are many ways to add javascript to a page, I find putting the javascript in a literal much less stressful.  Using a Literal control placeholder is also a good way to add messaging to a page after postback, but we&#8217;re just going to look at adding javascript.</p>
<p>Let&#8217;s take a simple example.  Say you&#8217;ve got a comment form that you want to auto close, or reload after the form was posted.  Below is a simple single file style asp.net page with a simple javascript function that reloads this page.</p>
<pre class="brush: csharp; title: ; notranslate">
&lt;%@ Page Language=&quot;C#&quot; %&gt;

&lt;script runat=&quot;server&quot;&gt;
/// &lt;summary&gt;
/// &lt;/summary&gt;
/// &lt;param name=&quot;sender&quot;&gt;&lt;/param&gt;
/// &lt;param name=&quot;e&quot;&gt;&lt;/param&gt;
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {

    }
}

///////////////////////////////////////////////////////////////////////////////
/// Do stuff with the form data, then refresh page using javascript
protected void submitComments(object sender, EventArgs e)
{

    try
    {
	//
	// do stuff here
	//

	// set javascript timer to reload page afer 3 seconds
	js_target.Text = &quot;setTimeout('reload()', 3000);&quot;;

    }
    catch (Exception exc)
    {
        Response.Write( &quot;ERROR : &quot; + exc.Message );
    }
}
&lt;/script&gt;

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;

&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &gt;
&lt;head&gt;
	&lt;title&gt;Comments&lt;/title&gt;
	&lt;script type=&quot;text/javascript&quot;&gt;
	// page reload helper
	function reload() {
		document.location.replace( document.location );
	}
	&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;form id=&quot;form1&quot; runat=&quot;server&quot; method=&quot;post&quot;&gt;

&lt;script type=&quot;text/javascript&quot;&gt;&lt;asp:Literal runat=&quot;server&quot; id=&quot;js_target&quot; /&gt;&lt;/script&gt;

	Comments
	&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;comment_box&quot; Width=&quot;200&quot; /&gt;
	&lt;br&gt;&lt;br&gt;

	Your name
	&lt;asp:TextBox runat=&quot;server&quot; ID=&quot;fullname&quot; Width=&quot;200&quot; /&gt;
	&lt;br&gt;&lt;br&gt;
	&lt;asp:Button runat=&quot;server&quot; ID=&quot;submit_btn&quot; onclick=&quot;submitComment&quot; Text=&quot;submit&quot; /&gt;

&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>If you look just under the form tag you&#8217;ll see the key to this technique, an asp literal wrapped by an open and close script tag.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script type=&quot;text/javascript&quot;&gt;&lt;asp:Literal runat=&quot;server&quot; id=&quot;js_target&quot; /&gt;&lt;/script&gt;
</pre>
<p>When you load your page and view the source you&#8217;ll just see an empty script tag, so it shouldn&#8217;t interfere with the execution or rendering of your page.</p>
<p>The last part of this technique is simple, in your server code just set your Literal control&#8217;s .Text value to your javascript code.  In this case when I post my comment form, after handling the input data I display a thank you message, then set some javascript to reload the page.</p>
<pre class="brush: csharp; title: ; notranslate">
ltl_js.Text = &quot;setTimeout('reload()', 3000);&quot;;
</pre>
<p>That&#8217;s all there is to it.  Drop a literal in an empty script block and BAM!, you have an easy way to add javascript to your asp.net page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/02/injecting-javascript-into-asp-net-via-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Use sys.dm_exec_sessions to disconnect SQL user connections</title>
		<link>http://ericfickes.com/2011/01/use-sys-dm_exec_sessions-to-disconnect-sql-user-connections/</link>
		<comments>http://ericfickes.com/2011/01/use-sys-dm_exec_sessions-to-disconnect-sql-user-connections/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 03:18:00 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://ericfickes.posterous.com/use-sysdmexecsessions-to-disconnect-sql-user</guid>
		<description><![CDATA[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 -- init vars DECLARE &#8230; <a href="http://ericfickes.com/2011/01/use-sys-dm_exec_sessions-to-disconnect-sql-user-connections/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!--[CDATA[</p>
<div class="data type-sql"-->
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
<pre class="line_numbers"><span id="L1">1</span>
<span id="L2">2</span>
<span id="L3">3</span>
<span id="L4">4</span>
<span id="L5">5</span>
<span id="L6">6</span>
<span id="L7">7</span>
<span id="L8">8</span>
<span id="L9">9</span>
<span id="L10">10</span>
<span id="L11">11</span>
<span id="L12">12</span>
<span id="L13">13</span>
<span id="L14">14</span>
<span id="L15">15</span>
<span id="L16">16</span>
<span id="L17">17</span>
<span id="L18">18</span>
<span id="L19">19</span>
<span id="L20">20</span>
<span id="L21">21</span>
<span id="L22">22</span>
<span id="L23">23</span>
<span id="L24">24</span>
<span id="L25">25</span>
<span id="L26">26</span>
<span id="L27">27</span>
<span id="L28">28</span>
<span id="L29">29</span>
<span id="L30">30</span>
<span id="L31">31</span>
<span id="L32">32</span>
<span id="L33">33</span>
<span id="L34">34</span>
<span id="L35">35</span>
<span id="L36">36</span></pre>
</td>
<td width="100%">
<div class="highlight">
<pre>
<div id="LC1" class="line"><span class="c1">-- init vars</span></div>
<div id="LC2" class="line"><span class="k">DECLARE</span> <span class="o">@</span><span class="n">sessID</span> <span class="nb">int</span><span class="p">,</span></div>
<div id="LC3" class="line">		<span class="o">@</span><span class="n">dbName</span> <span class="nb">varchar</span><span class="p">(</span><span class="mi">50</span><span class="p">),</span></div>
<div id="LC4" class="line">		<span class="o">@</span><span class="n">userName</span> <span class="nb">varchar</span><span class="p">(</span><span class="mi">50</span><span class="p">)</span></div>
<div id="LC6" class="line"><span class="k">SET</span> <span class="o">@</span><span class="n">dbName</span>	<span class="o">=</span> <span class="s1">'DA413'</span>	<span class="c1">-- your database name</span></div>
<div id="LC7" class="line"><span class="k">SET</span> <span class="o">@</span><span class="n">userName</span>	<span class="o">=</span> <span class="s1">'DA413'</span>	<span class="c1">-- sql user account to look for</span></div>
<div id="LC10" class="line"><span class="c1">-- use a cursor to store all session_ids</span></div>
<div id="LC11" class="line"><span class="k">DECLARE</span> <span class="n">session_cursor</span> <span class="k">CURSOR</span></div>
<div id="LC12" class="line"><span class="k">FOR</span></div>
<div id="LC13" class="line">	<span class="k">SELECT</span>	<span class="n">session_id</span></div>
<div id="LC14" class="line">	<span class="k">FROM</span>	<span class="n">sys</span><span class="p">.</span><span class="n">dm_exec_sessions</span></div>
<div id="LC15" class="line">	<span class="k">WHERE</span>	<span class="n">original_login_name</span> <span class="o">=</span> <span class="o">@</span><span class="n">userName</span></div>
<div id="LC17" class="line">	<span class="c1">-- open cursor and grab first row</span></div>
<div id="LC18" class="line">	<span class="k">OPEN</span> <span class="n">session_cursor</span></div>
<div id="LC19" class="line">	<span class="k">FETCH</span> <span class="k">NEXT</span> <span class="k">FROM</span> <span class="n">session_cursor</span> <span class="k">INTO</span> <span class="o">@</span><span class="n">sessID</span></div>
<div id="LC21" class="line">	<span class="c1">-- loop through session_ids</span></div>
<div id="LC22" class="line">	<span class="n">WHILE</span> <span class="o">@@</span><span class="n">FETCH_STATUS</span> <span class="o">=</span> <span class="mi">0</span></div>
<div id="LC23" class="line">	<span class="k">BEGIN</span></div>
<div id="LC25" class="line">		<span class="c1">-- kill it</span></div>
<div id="LC26" class="line">		<span class="c1">-- using EXEC because the sproc kill does not like @variables</span></div>
<div id="LC27" class="line">		<span class="k">EXEC</span><span class="p">(</span><span class="s1">'kill '</span> <span class="o">+</span> <span class="o">@</span><span class="n">sessID</span><span class="p">)</span></div>
<div id="LC29" class="line">		<span class="c1">-- get the next session_id</span></div>
<div id="LC30" class="line">		<span class="k">FETCH</span> <span class="k">NEXT</span> <span class="k">FROM</span> <span class="n">session_cursor</span> <span class="k">INTO</span> <span class="o">@</span><span class="n">sessID</span></div>
<div id="LC31" class="line">	<span class="k">END</span></div>
<div id="LC33" class="line"><span class="c1">-- cursor cleanup</span></div>
<div id="LC34" class="line"><span class="k">CLOSE</span> <span class="n">session_cursor</span></div>
<div id="LC35" class="line"><span class="k">DEALLOCATE</span> <span class="n">session_cursor</span></div>
</pre>
</div>
</td>
</tr>
</tbody>
</table>
<p><a href="http://ericfickes.posterous.com/use-sysdmexecsessions-to-disconnect-sql-user">Permalink</a></p>
<p>| <a href="http://ericfickes.posterous.com/use-sysdmexecsessions-to-disconnect-sql-user#comment">Leave a comment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2011/01/use-sys-dm_exec_sessions-to-disconnect-sql-user-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 of 10,388 days remaining #TRON</title>
		<link>http://ericfickes.com/2010/12/2-of-10388-days-remaining-tron/</link>
		<comments>http://ericfickes.com/2010/12/2-of-10388-days-remaining-tron/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 18:38:36 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[fun]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[motivation]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[tsql]]></category>

		<guid isPermaLink="false">http://ericfickes.posterous.com/2-of-10388-days-remaining-tron</guid>
		<description><![CDATA[&#8211; Using tsql to figure out how long until TRON:LEGACY DECLARE @tron datetime, @tron_legacy datetime SET @tron = &#8217;7/9/1982 12:00:00&#8242; SET @tron_legacy = &#8217;12/17/2010 12:00:00&#8242; SELECT CAST( DATEDIFF( DD, GETDATE(), @tron_legacy ) as varchar(2) ) + &#8216; of&#8217; + CAST &#8230; <a href="http://ericfickes.com/2010/12/2-of-10388-days-remaining-tron/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!--[CDATA[</p>
<div-->&#8211; Using tsql to figure out how long until TRON:LEGACY</p>
<div>DECLARE @tron datetime,</div>
<div><span> </span>@tron_legacy datetime</div>
<div>SET @tron = &#8217;7/9/1982 12:00:00&#8242;</div>
<div>SET @tron_legacy = &#8217;12/17/2010 12:00:00&#8242;</div>
<div>SELECT<span> </span>CAST( DATEDIFF( DD, GETDATE(), @tron_legacy ) as varchar(2) ) + &#8216; of&#8217; + CAST ( DATEDIFF( DD, @tron, @tron_legacy ) AS VARCHAR(1000) ) + &#8216; days remaining&#8217; as &#8216;How long until TRON:LEGACY?&#8217;</div>
<div>&#8211; returns</div>
<div>&#8211; 2 of10388 days remaining</div>
<p><a href="http://ericfickes.posterous.com/2-of-10388-days-remaining-tron">Permalink</a></p>
<p>| <a href="http://ericfickes.posterous.com/2-of-10388-days-remaining-tron#comment">Leave a comment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/12/2-of-10388-days-remaining-tron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Endless Mural wins FWA site of the day</title>
		<link>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/</link>
		<comments>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/#comments</comments>
		<pubDate>Sat, 20 Nov 2010 06:55:25 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[beauty of the web]]></category>
		<category><![CDATA[branden hall]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[endlessmural]]></category>
		<category><![CDATA[FixDBLib]]></category>
		<category><![CDATA[generative art]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[joshua davis]]></category>
		<category><![CDATA[okapi]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1750</guid>
		<description><![CDATA[I&#8217;m ecstatic to announce the Endless Mural HTML5 project has won the prestigious FWA Site of the day award.  While this isn&#8217;t the first project I&#8217;ve worked on that has won the FWA, it is the first NON-Flash, HTML5 and &#8230; <a href="http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_1822" class="wp-caption aligncenter" style="width: 610px"><a title="Endless Mural wins FWA SOTD, and we didn't even use Flash!" href="http://www.thefwa.com/site/the-endless-mural" target="_blank"><img class="size-full wp-image-1822 " style="border: 0px initial initial;" title="Endless Mural &gt; FWA site of the day" src="http://ericfickes.com/wp-content/uploads/2010/11/endlessmural-fwa.png" alt="FWA Site of the day &gt; Nov 22 2010" width="600" height="395" /></a><p class="wp-caption-text">Endless Mural wins FWA for HTML5</p></div>
<p>I&#8217;m ecstatic to announce the Endless Mural HTML5 project has won the prestigious <a title="Endless Mural wins the FWA Site of the day award" href="http://www.thefwa.com/site/the-endless-mural" target="_blank">FWA Site of the day award</a>.  While this isn&#8217;t the first project I&#8217;ve worked on that has <a title="Wiretree.com has kicked out a handful of FWAs.  Because they're that good" href="http://thefwa.com/profile/wiretree" target="_blank">won the FWA</a>, it is the first NON-Flash, HTML5 and ASP.NET project that has.  No Flash, and we still got the FWA site of the day, SWEET!.</p>
<h1>I need a SQL Ninja</h1>
<div>
<p>On Friday July 23rd I got the chance to skateboard with my good buddy and personal hero <a title="Joshua Davis Studios" href="http://joshuadavis.com" target="_blank">Joshua Davis</a>.  I feel lucky being able to say we&#8217;ve actually been skating together for a few years now, but this was certainly my favorite session we&#8217;ve had so far.  We started out at <a title="Broomfield Skatepark pictures on sk8colorado.blogspot.com" href="http://sk8colorado.blogspot.com/2010/07/broomfield-skatepark.html" target="_blank">Broomfield&#8217;s new park</a> because I had to show Josh the new mini bowl.</p>
<div id="attachment_1762" class="wp-caption aligncenter" style="width: 235px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/josh-eric-skate-checkin.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1762" title="Joshua Davis and Eric Fickes" src="http://ericfickes.com/wp-content/uploads/2010/11/josh-eric-skate-checkin-225x300.jpg" alt="skate or fry" width="225" height="300" /></a><p class="wp-caption-text">Two hot dogs ( http://yfrog.com/n3hs5j )</p></div>
<p>After Broomfield we made a quick stop for lunch, and then on to the Denver Skatepark in downtown.  It was great showing Josh the lines at my hometown skateparks, as well as a few radical maneuvers.</p>
<p>Now that Josh had seen my non-frontside airs, it was time to wrap things up.  As we were saying our goodbyes I decided to ask about work.  Normally I don&#8217;t talk about work at the skatepark, but I was thinking about going indie again, and figured what the heck.</p>
<p>Turns out Josh was about to start a project for <a title="Endless Mural &gt; Part of the IE9 launch project 'Beauty of the Web'" href="http://www.beautyoftheweb.com" target="_blank">Microsoft</a> ( WHAT?!?! ) and he need to &#8220;find a SQL Ninja&#8221; ( DOUBLE WHAT?!?! ).  I&#8217;ve been actively working with MS SQL Server since version 6.5, so I let him know he was looking at his sql ninja.  Josh was interested, but gave me the &#8220;just cause we&#8217;re bros, doesn&#8217;t put you on the team&#8221;.</p>
<h1>HTML5 drawing tool in one night</h1>
<p>Driving home from the skatepark I called my wife super giddy.  &#8221;Honey, I may be going indie sooner than we planned&#8221;.  I gave her the rundown of the potential project Josh and I just spoke about, and let her know I had some homework to do.  That night I went home and built out a distant cousin of the endless mural project.</p>
<div style="clear: both;">
<div id="attachment_1781" class="wp-caption alignleft" style="width: 243px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-html5.png" rel="lightbox[1750]"><img class="size-medium wp-image-1781" title="EFDRAW" src="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-html5-233x300.png" alt="You can draw with HTML5" width="233" height="300" /></a><p class="wp-caption-text">HTML5 drawing tool powered by ASPX and MySQL</p></div>
<div id="attachment_1782" class="wp-caption alignright" style="width: 244px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-skull.png" rel="lightbox[1750]"><img class="size-medium wp-image-1782" title="draw save and share" src="http://ericfickes.com/wp-content/uploads/2010/11/efdraw-skull-234x300.png" alt="sloppy html5 drawing" width="234" height="300" /></a><p class="wp-caption-text">HTML5 drawing tool powered by ASPX and MySQL</p></div>
</div>
</div>
<p><a title="I built an HTML5 drawing tool overnight" href="http://fickii.com/efdraw/" target="_blank">EFDRAW</a> is a really simple HTML5 drawing tool powered by ASP.NET and MySQL.  It has most of the features of the mural ( draw, save, replay, share ), but this was only a proof of concept.  This was my first dive into HTML5 development, and it&#8217;s pretty sweet.</p>
<p><object id="stU0hSREFIR1FfQFVcU1tYV1dV" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.screentoaster.com/swf/STPlayer.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="video=stU0hSREFIR1FfQFVcU1tYV1dV" /><param name="src" value="http://www.screentoaster.com/swf/STPlayer.swf" /><param name="allowfullscreen" value="true" /><embed id="stU0hSREFIR1FfQFVcU1tYV1dV" type="application/x-shockwave-flash" width="425" height="344" src="http://www.screentoaster.com/swf/STPlayer.swf" flashvars="video=stU0hSREFIR1FfQFVcU1tYV1dV" allowscriptaccess="always" allowfullscreen="true" data="http://www.screentoaster.com/swf/STPlayer.swf"></embed></object></p>
<p>If you&#8217;re interested in HTML5 drawing tools, feel free to play around with <a title="I bult an HTML5 drawing tool overnight" href="http://fickii.com/efdraw/" target="_blank">EFDRAW</a>, view source, help yourself.</p>
<h1>There&#8217;s one thing&#8230;. Azure</h1>
<p>A few days after building EFDRAW my band <a href="http://twitter.com/#!/thecompilers/status/20575513102" target="_blank">The Compilers</a> played at Ignite Denver 7.  Right before starting our first set my phone rings and it&#8217;s Josh!  OMG I think, this is either the &#8220;you got it&#8221; or the &#8220;sorry bud, we&#8217;ll skate again&#8221; call.  I decide to take the call even though we were locked and loaded, standing on stage with our gear waiting for the house music to go down.  I answer and it&#8217;s Josh, but not the usual hyperactive Josh I&#8217;m accustomed to.  I ask about the gig and he says &#8220;Well, there&#8217;s one thing.  We have to use Azure&#8221;.</p>
<p>I let him know I&#8217;ve worked with other cloud platforms already, just not Microsoft&#8217;s.  So we talk a little more and Josh passes the phone to Branden so we can talk 0s and 1s.  After talking to Branden &#8220;mega brain&#8221; Hall for a few minutes he asks if I can do this.  I tell him yes, he says yes, I get excited, he gets excited.  Branden passed me back to Josh and I&#8217;m in shock at this point.</p>
<h1>Now the boring stuff</h1>
<p>So that&#8217;s the story of how I landed the Endless Mural gig, now the boring technical details.</p>
<p>The drawing portion of the mural was built by <a title="Branden Hall's personal website" href="http://waxpraxis.org" target="_blank">Branden Hall</a> of <a title="Automata Studios :: Branden Hall's software company" href="http://automatastudios.com" target="_blank">Automata Studios</a>.  I did the backend which is made up of ASP.NET ( C# ), SQL Azure, and Windows Azure.  We&#8217;re using Azure blob storage to save and serve up the PNGs created at the mural.  To access SQL server, I wrote a super lightweight data access library using all native .NET.</p>
<p>For the most part the backend was very much like every other .NET SQL Server project I build, but Azure did introduce a few gotchas.</p>
<ol>
<li>The publishing and management of your cloud site mainly goes through <a title="Windows Azure control panel" href="http://windows.azure.com/" target="_blank">http://windows.azure.com/</a>.</li>
<li>You can deploy your site from Visual Studio which proved to be immensely helpful after my Azure deploy package grew beyond 100 MB.</li>
<li>You can access SQL Azure directly from SQL 2008+ management tools.</li>
<li>You can not FTP single files up to the cloud, only the full ball of wax.</li>
<li>You can still use web.config for configuration storage, but Azure also has it&#8217;s own version of web.config.</li>
<li>If you need to edit your settings after deploying, store those settings in your Azure service config, not web.config</li>
<li>SQL Azure requires all tables to use clustered indexes</li>
<li>SQL Azure has it&#8217;s own TSQL restrictions ( not many, but be aware )</li>
<li>On average, doing a full republish of an Azure site took a full hour.</li>
</ol>
<p>I could probably ramble on and on about Azure, but I&#8217;ll cut it short.  If you happen to have any questions about Azure feel free to hit me up or leave a comment.  I would also like to say that I <em>know</em> Microsoft is and has been actively improving Azure by the day.  The state of Azure today is most likely even better than when we built the mural, so my experiences may not be your own.</p>
<h1 style="font-family: Georgia, 'Bitstream Charter', serif; color: #000000; line-height: 1.5em; font-size: 2.4em; margin-top: 0px; margin-right: 0px; margin-bottom: 20px; margin-left: 0px; font-weight: normal;">The toolbox</h1>
<ul>
<li>Windows Azure SDK</li>
<li>Windows Azure Platform Kit June 2010</li>
<li>Windows Azure Tools for Visual Studio ( v1.2 )</li>
<li>Microsoft Seadragon Ajax library</li>
<li>Microsoft SQL Server 2008 R2</li>
<li>Microsoft SQL Azure</li>
<li>ASP.NET 4 ( C# )</li>
<li>Windows Azure</li>
<li>Azure Storage Explorer</li>
</ul>
<p>Here is the <a title="The Endless Mural toolbox" href="http://automatastudios.com/the-endless-mural-toolbox/" target="_blank">toolbox that Branden used on the client side</a>.</p>
<h1>Hotlinks from the server guy</h1>
<ul>
<li><a title="Developoing and Deploying with SQL Azure" href="http://social.technet.microsoft.com/wiki/contents/articles/developing-and-deploying-with-sql-azure.aspx" target="_blank">Developing and Deploying with SQL Azure</a></li>
<li><a title="SQL Azure T-SQL reference" href="http://msdn.microsoft.com/en-us/library/ee336281.aspx" target="_blank">SQL Azure DB T-SQL reference</a></li>
<li><a title="Azure w/Intellitrace" href="http://blogs.msdn.com/b/jnak/archive/2010/06/07/using-intellitrace-to-debug-windows-azure-cloud-services.aspx" target="_blank">Azure w/Intellitrace</a></li>
<li><a title="How to upload download Page Blobs ( Windows Azure )" href="http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx" target="_blank">Using Windows Azure Page Blobs .. how to upload / download blobs</a></li>
<li><a title="Azure Deep Dive : Working with configuration" href="http://azure.snagy.name/blog/?p=176" target="_blank">Windows Azure Deep Dive: Working with Configuration</a></li>
<li><a title="Getting started with Seadragon AJAX" href="http://www.seadragon.com/developer/ajax/getting-started/" target="_blank">Seadragon Ajax &#8211; Getting Started</a></li>
<li><a title="Creating Deep Zoom content" href="http://www.silverlight.net/learn/whitepapers/deep-zoom-tools/" target="_blank">Creating Content : Deep Zoom Tools</a></li>
<li><a title="Deep Zoom Blog" href="http://blogs.msdn.com/b/lutzg/" target="_blank">Deep Zoom Blog</a></li>
<li><a title="How to create a Twitter TWEET button" href="http://dev.twitter.com/pages/tweet_button" target="_blank">Twitter TWEET Button</a></li>
</ul>
<h1>It&#8217;s a wrap</h1>
<p>This project was the most concentrated five weeks I&#8217;ve had in quite some time.  I still wonder if we were only given five weeks because this was an HTML5 project.  Either way, the mural team made some magic and now you can too.  If you&#8217;re like me and just want to doodle, <a href="http://endlessmural.com/" target="_blank">go make some art at the mural</a>.  If you&#8217;re a developer interested in HTML5 and Javascript programming, go check out <a title="OKAPI.js, the javascript behind endlessmural.com" href="http://www.okapijs.org/" target="_blank">the javascript library okapi.js</a> which Branden Hall recently open sourced.</p>
<p>Also be sure to visit the magicians, I mean artists, who made the amazing patterns you see when using the mural.  I&#8217;m a life long doodler, but can&#8217;t art myself out of a paper bag.</p>
<div>
<h2 style="text-align: center;"><a title="Evgeny Kiselev" href="http://www.ekiselev.com" target="_blank">Evgeny Kiselev</a></h2>
<div id="attachment_1839" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/evgeny-kiselev.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1839 " title="evgeny-kiselev" src="http://ericfickes.com/wp-content/uploads/2010/11/evgeny-kiselev-300x158.jpg" alt="Evgeny Kiselev - www.ekiselev.com" width="300" height="158" /></a><p class="wp-caption-text">Evgeny Kiselev - www.ekiselev.com</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Guilherme Marconi" href="http://brain.marconi.nu" target="_blank">Guilherme Marconi</a></h2>
<div id="attachment_1840" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/guilherme-marconi.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1840" title="guilherme-marconi" src="http://ericfickes.com/wp-content/uploads/2010/11/guilherme-marconi-300x168.jpg" alt="Guilherme Marconi - brain.marconi.nu" width="300" height="168" /></a><p class="wp-caption-text">Guilherme Marconi - brain.marconi.nu</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Joshua Davis" href="http://www.joshuadavis.com" target="_blank">Joshua Davis</a></h2>
<div id="attachment_1841" class="wp-caption aligncenter" style="width: 310px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/joshua-davis.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1841" title="joshua-davis" src="http://ericfickes.com/wp-content/uploads/2010/11/joshua-davis-300x225.jpg" alt="Joshua Davis - www.joshuadavis.com" width="300" height="225" /></a><p class="wp-caption-text">Joshua Davis - www.joshuadavis.com</p></div>
</div>
<div>
<h2 style="text-align: center;"><a title="Matt Lyon" href="http://www.c8six.com" target="_blank">Matt Lyon</a></h2>
<div id="attachment_1842" class="wp-caption aligncenter" style="width: 287px"><a href="http://ericfickes.com/wp-content/uploads/2010/11/matt-lyon.jpg" rel="lightbox[1750]"><img class="size-medium wp-image-1842" title="matt-lyon" src="http://ericfickes.com/wp-content/uploads/2010/11/matt-lyon-277x300.jpg" alt="Matt Lyon - www.c8six.com" width="277" height="300" /></a><p class="wp-caption-text">Matt Lyon - www.c8six.com</p></div>
<p>And lastly I put up a photo album on Facebook of all my camera phone pictures from the trip.  <a title="camera phone pictures from my trip to SF to launch endlessmural.com" href="http://www.facebook.com/album.php?aid=220650&amp;id=500552652&amp;l=fe921f2bc4" target="_blank">Check out the endlessmural photo album</a>.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/11/endless-mural-wins-fwa-site-of-the-day/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Want to see some kick ass HTML5?</title>
		<link>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/</link>
		<comments>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/#comments</comments>
		<pubDate>Thu, 16 Sep 2010 02:22:45 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[art]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[automata studios]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[beauty of the web]]></category>
		<category><![CDATA[branden hall]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ie9]]></category>
		<category><![CDATA[joshua davis]]></category>
		<category><![CDATA[sql azure]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1654</guid>
		<description><![CDATA[I&#8217;m extremely happy to announce the www.endlessmural.com project was launched today and it was a huge success.  I intend on posting something with more details when I return home, but in the meantime please please check this site out.  It&#8217;s &#8230; <a href="http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m extremely happy to announce the <a href="http://www.endlessmural.com">www.endlessmural.com</a> project was launched today and it was a huge success.  I intend on posting something with more details when I return home, but in the meantime please please check this site out.  It&#8217;s my current favorite example of HTML5 in action, and it works in all modern browsers ( yes, even iPad ).</p>
<div id="attachment_1655" class="wp-caption aligncenter" style="width: 591px"><a href="http://www.endlessmural.com/"><img class="size-full wp-image-1655" title="endlessmural.com" src="http://ericfickes.com/wp-content/uploads/2010/09/endlessmural-dot-com.png" alt="The coolest HTML5 sample you will see on the internet" width="581" height="644" /></a><p class="wp-caption-text">Go make art at endlessmural.com</p></div>
<p>Endlessmural.com is a generative drawing tool written in HTML5, Javascript, CSS3, on top of a Microsoft Azure backend.  Go, make art, share the url.</p>
<p>Here is a piece I made today.</p>
<p><a href="http://www.endlessmural.com/#590"><img class="aligncenter size-medium wp-image-1656" title="You can make art at endlessmural.com" src="http://ericfickes.com/wp-content/uploads/2010/09/endlessmural-dot-com-image590-300x216.png" alt="endlessmural.com artwork" width="300" height="216" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/09/want-to-see-some-kick-ass-html5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to add new Role to existing Azure Cloud Service</title>
		<link>http://ericfickes.com/2010/08/how-to-add-new-role-to-existing-azure-cloud-service/</link>
		<comments>http://ericfickes.com/2010/08/how-to-add-new-role-to-existing-azure-cloud-service/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 19:58:09 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[internets]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://ericfickes.posterous.com/how-to-add-new-role-to-existing-azure-cloud-s</guid>
		<description><![CDATA[I know this is an easy one, but I&#8217;ll forget it if I don&#8217;t write this down. When working with Azure projects in Visual Studio, you can add new Roles to existing Service projects like this. Right click the Roles &#8230; <a href="http://ericfickes.com/2010/08/how-to-add-new-role-to-existing-azure-cloud-service/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!--[CDATA[</p>
<p--> <a href="http://posterous.com/getfile/files.posterous.com/ericfickes/9ELOwK2JCKSqxUtBNR66c0GOdWzlQWHfiJ0otzN0JVBwJmiaHcVgD1NsEU6E/add-role-to-existing-service.png" rel="lightbox[2028]"><img src="http://posterous.com/getfile/files.posterous.com/ericfickes/PV8Pru48RvqDcCCP2qm0hm5x5HUfqGum36iDVVHXZe5HQdsAxtcyLuTkD25T/add-role-to-existing-service.png.scaled.500.jpg" alt="" width="500" height="165" /></a></p>
<p>I know this is an easy one, but I&#8217;ll forget it if I don&#8217;t write this down.</p>
<div>When working with Azure projects in Visual Studio, you can add new Roles to existing Service projects like this.</div>
<div>
<ol>
<li>Right click the Roles folder in your service project</li>
<li>Left click Add &gt;</li>
<li>Left click on the type of Role you want to add to your project</li>
</ol>
</div>
<p><a href="http://ericfickes.posterous.com/how-to-add-new-role-to-existing-azure-cloud-s">Permalink</a></p>
<p>| <a href="http://ericfickes.posterous.com/how-to-add-new-role-to-existing-azure-cloud-s#comment">Leave a comment</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/08/how-to-add-new-role-to-existing-azure-cloud-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upload to ASP.NET from HTML, Flash, or Flex clients</title>
		<link>http://ericfickes.com/2010/08/upload-to-asp-net-from-html-flash-or-flex-clients/</link>
		<comments>http://ericfickes.com/2010/08/upload-to-asp-net-from-html-flash-or-flex-clients/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 03:18:49 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[flash platform]]></category>
		<category><![CDATA[FLEX]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[asp.net upload]]></category>
		<category><![CDATA[flash upload]]></category>
		<category><![CDATA[flex upload]]></category>
		<category><![CDATA[html upload]]></category>
		<category><![CDATA[NETWORK SERVICE]]></category>
		<category><![CDATA[Request.Files]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[upload handler]]></category>
		<category><![CDATA[uploader]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1625</guid>
		<description><![CDATA[File uploading has been a hot topic during my time as an internet programmer.  In the classic ASP days this was a bit of a task to build and get correct.  Nowadays both Adobe&#8217;s Coldfusion and Microsoft&#8217;s ASP.NET both have &#8230; <a href="http://ericfickes.com/2010/08/upload-to-asp-net-from-html-flash-or-flex-clients/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>File uploading has been a hot topic during my time as an internet programmer.  In the classic ASP days this was a bit of a task to build and get correct.  Nowadays both <a title="Coldfusion makes file handling simple with &lt;CFFILE /&gt;" href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fa1.html" target="_blank">Adobe&#8217;s Coldfusion</a> and <a title="ASP.NET has the FileUpload class" href="http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.fileupload.aspx" target="_blank">Microsoft&#8217;s ASP.NET</a> both have built in file uploader tags ( server controls ) that handle this with ease.</p>
<p>This is great, but what happens when you have a mixed bag of clients that all need to upload to the same location?  Sometimes I work with completely ASP.NET or CF web apps, but more often than not I&#8217;m dealing with Flash clients as well as HTML clients.</p>
<p>Recently I ran into this upload scenario and built this simple ASP.NET uploader script.  This feels a bit old school since it uses .NET&#8217;s built in Request.Files collection, instead of a fancy new &#8216;all in one&#8217; server control, but I actually prefer this method.</p>
<p>Here&#8217;s all you need :</p>
<pre class="brush: csharp; title: ; notranslate">
// Check for posted files
for (int xx = 0; xx &lt; Request.Files.Count; xx++)
{
    // UPLOAD FILE
    HttpPostedFile _file = Request.Files[xx];

    // make sure we're not finding empty filename
    if (_file.FileName.Trim() != string.Empty)
    {
        // NOTE : IE &lt; 8 reports full path of file, not just filename
        // Parse out filename, then create full upload path
        var fileName = _file.FileName;
        if (fileName.Contains(&quot;\\&quot;))
        {
            var aFile = fileName.Split('\\');
            fileName = aFile[ aFile.Length - 1 ].ToString();
        }

        // create full save path for uploaded file
        var full_file_path = Server.MapPath( UP_FOLDER ) + &quot;\\&quot; + fileName;

        try
        {
            // save file to server
            _file.SaveAs(full_file_path);
        }
        catch (Exception exc)
        {
            var emsg = &quot;Unable to upload file : &quot; + exc.Message;

            Response.Write( emsg );
            Response.Flush();
            Response.End();
        }

        // show result
        Response.Write( _file.FileName + &quot; uploaded! &lt;br&gt;&quot; );
    }
}
</pre>
<p>That&#8217;s all there is to it codewise.  Before using this code you will need to give the NETWORK SERVICES user write permissions to your upload folder.  Other than that, that&#8217;s all she wrote!</p>
<p><a title="ASP.NET uploader, HTML upload, Flash upload, and Flex upload clients" href="http://ericfickes.com/code/aspxuploader.zip" target="_blank">Here is a zip of all the code for you to download</a>.</p>
<p>Inside this zip you will find :</p>
<ul>
<li><strong>flashclient.fla</strong> &#8211; Flash upload client ( <em>*be sure to update the upload path before building</em> )</li>
<li><strong>flexclient.mxml</strong> &#8211; Flex upload client ( <em>*also update upload path before building</em> )</li>
<li><strong>uploader.aspx </strong>- ASP.NET file upload handler</li>
<li><strong>uploadform.html </strong>- sample HTML upload form ( <em>again, update path</em> )</li>
</ul>
<p>Hope somebody finds this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/08/upload-to-asp-net-from-html-flash-or-flex-clients/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to show line numbers in Visual Studio 2010</title>
		<link>http://ericfickes.com/2010/08/how-to-show-line-numbers-in-visual-studio-2010/</link>
		<comments>http://ericfickes.com/2010/08/how-to-show-line-numbers-in-visual-studio-2010/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 19:11:35 +0000</pubDate>
		<dc:creator>Eric Fickes</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[tips and tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[line numbers]]></category>
		<category><![CDATA[text editor]]></category>
		<category><![CDATA[visual studio options]]></category>

		<guid isPermaLink="false">http://ericfickes.com/?p=1614</guid>
		<description><![CDATA[I&#8217;ve been using Visual Studio since forever, yet it always takes me a while to remember how to show line numbers.  It&#8217;s especially hard to remember after a fresh install of Visual Studio.  Assuming you have it installed and open, &#8230; <a href="http://ericfickes.com/2010/08/how-to-show-line-numbers-in-visual-studio-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Visual Studio since forever, yet it always takes me a while to remember how to show line numbers.  It&#8217;s especially hard to remember after a fresh install of Visual Studio.  Assuming you have it installed and open, here&#8217;s how to display line numbers in your code.</p>
<ol>
<li>Click Tools in the menu bar</li>
<li>Options</li>
<li>Expand Text Editor ( in the popup window )</li>
<li>Click &#8216;All Languages&#8217;</li>
<li>Check the &#8216;Line numbers&#8217; box under the Display heading ( on the right )</li>
<li>Click OK</li>
<li>Happy Happy Joy Joy!</li>
</ol>
<p><a href="http://ericfickes.com/wp-content/uploads/2010/08/show-line-number-visual-studio-2010.png" rel="lightbox[1614]"><img class="aligncenter size-full wp-image-1615" title="Display Line numbers in Visual Studio 2010" src="http://ericfickes.com/wp-content/uploads/2010/08/show-line-number-visual-studio-2010.png" alt="How to Display Line numbers in Visual Studio 2010" width="784" height="848" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://ericfickes.com/2010/08/how-to-show-line-numbers-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

