<?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>PeterKellner.net &#187; Database</title>
	<atom:link href="http://peterkellner.net/category/database/feed/" rel="self" type="application/rss+xml" />
	<link>http://peterkellner.net</link>
	<description>Microsoft Focused, JavaScript,HTML5 (ExtJS, SenchaTouch &#38; Windows 8 Metro)</description>
	<lastBuildDate>Fri, 11 May 2012 16:43:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Getting ExtJS 4 Date Format To Behave Properly in Grid Panel with ASP.NET MVC3</title>
		<link>http://peterkellner.net/2011/08/24/getting-extjs-4-date-format-to-behave-properly-in-grid-panel-with-asp-net-mvc3/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-extjs-4-date-format-to-behave-properly-in-grid-panel-with-asp-net-mvc3</link>
		<comments>http://peterkellner.net/2011/08/24/getting-extjs-4-date-format-to-behave-properly-in-grid-panel-with-asp-net-mvc3/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 18:52:44 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[.NET 4.0]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DateFormat]]></category>
		<category><![CDATA[MVC3]]></category>
		<category><![CDATA[Sencha]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2011/08/24/getting-extjs-4-date-format-to-behave-properly-in-grid-panel-with-asp-net-mvc3/</guid>
		<description><![CDATA[&#160;
Introduction and Problem
Converting Data Formats back and forth between browser and back end servers can be a little confusing.&#160; In my case, I have a simple Sencha&#160;ExtJS 4.0 form that the user types a date into.&#160; That date gets passed through an ajax request to the Microsoft asp.net controller, then that dates updates the SqlServer [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<h3>Introduction and Problem</h3>
<p>Converting Data Formats back and forth between browser and back end servers can be a little confusing.&#160; In my case, I have a simple <a href="http://www.sencha.com/">Sencha</a>&#160;<a href="http://www.sencha.com/products/extjs/">ExtJS 4.0</a> form that the user types a date into.&#160; That date gets passed through an <a href="http://www.w3schools.com/ajax/default.asp">ajax request</a> to the <a href="http://www.microsoft.com/en-us/default.aspx">Microsoft</a> <a href="http://www.asp.net/">asp.net</a> <a href="http://www.asp.net/mvc/mvc3">controller</a>, then that dates updates the <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server">SqlServer</a> Database.&#160; When the Date is displayed on a Grid Panel, again, an ajax request is made that grabs the date from the controller, then formats it using the MS <a href="http://dev.sencha.com/deploy/ext-4.0.2a/docs/#/api/Ext.data.Field-cfg-dateFormat">dateFormat</a> from ExtJS and hopefully, the same date the user typed in gets re-displayed.</p>
<div>
<div class="peterkellnerpromo"><a href="http://peterkellner.net/open-source-javascript-extjs-and-jquery/" target="_blank">If you have a problem like this involving ASP.NET or Sencha Tools (ExtJS, SenchaTouch), more information about our consulting services are <span>here.</span></a></div>
</div>
<p>So, let’s look at the details.</p>
<h3>Posting the Date To the Server (View From JavaScript)</h3>
<p>First, we need to define an ExtJS Model that has the date in it.&#160; That codes looks like this in my case.</p>
<p><span id="more-1556"></span></p>
<p>&#160;</p>
<div id="codeSnippetWrapper">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Ext.define(<span style="color: #006080">'EvMgr.model.SponsorListJobListing'</span>, {    extend: <span style="color: #006080">'Ext.data.Model'</span>,    fields: [        <span style="color: #006080">'Id'</span>,        <span style="color: #006080">'SponsorListId'</span>,        <span style="color: #006080">'JobName'</span>,        <span style="color: #006080">'JobLocation'</span>,        <span style="color: #006080">'JobURL'</span>,        <span style="color: #006080">'JobBrief'</span>,        <span style="color: #006080">'JobTagline'</span>,        <span style="color: #006080">'JobButtonToolTip'</span>,        { name: <span style="color: #006080">'EnteredDate'</span>, type: <span style="color: #006080">'date'</span>, dateFormat: <span style="color: #006080">'MS'</span> },        <span style="color: #006080">'JobCompanyName'</span>,        { name: <span style="color: #006080">'StartRunDate'</span>, type: <span style="color: #006080">'date'</span>, dateFormat: <span style="color: #006080">'MS'</span> },        { name: <span style="color: #006080">'EndRunDate'</span>, type: <span style="color: #006080">'date'</span>, dateFormat: <span style="color: #006080">'MS'</span> },        { name: <span style="color: #006080">'HideListing'</span>, type: <span style="color: #006080">'boolean'</span> },        <span style="color: #006080">'Notes'</span>    ],    idProperty: <span style="color: #006080">'Id'</span>,

    proxy: {        type: <span style="color: #006080">'ajax'</span>,        api: {            read: <span style="color: #006080">'SponsorListJobListing/Get'</span>,            update: <span style="color: #006080">'SponsorListJobListing/Update'</span>,            create: <span style="color: #006080">'SponsorListJobListing/Create'</span>,            destroy: <span style="color: #006080">'SponsorListJobListing/Delete'</span>        },        reader: {            type: <span style="color: #006080">'json'</span>,            root: <span style="color: #006080">'Data'</span>,            successProperty: <span style="color: #006080">'success'</span>        }    },

    belongsTo: <span style="color: #006080">'EvMgr.model.SponsorList'</span>});</pre>
<p></div>
<p>Notice the StartRunDate field has dateFormat of ‘MS”.</p>
<p>Now, we have an ExtJS Window that we use to collect the data from the user.&#160; The code is as follows:</p>
<div>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">Ext.define(<span style="color: #006080">'EvMgr.view.sponsorlist.ListJobListingsEdit'</span>, {    extend: <span style="color: #006080">'Ext.window.Window'</span>,    alias: <span style="color: #006080">'widget.sponsorlistjoblistingsedit'</span>,    title: <span style="color: #006080">'Edit Job Listing'</span>,    layout: <span style="color: #006080">'fit'</span>,    width: 1000,    autoShow: <span style="color: #0000ff">true</span>,

    initComponent: <span style="color: #0000ff">function</span>() {

        <span style="color: #0000ff">this</span>.items = [            {                xtype: <span style="color: #006080">'form'</span>,

                items: [                    {                        xtype: <span style="color: #006080">'textfield'</span>,                        name: <span style="color: #006080">'JobName'</span>,                        fieldLabel: <span style="color: #006080">'JobName'</span>,                        width: 850                    },                    {                        xtype: <span style="color: #006080">'textfield'</span>,                        name: <span style="color: #006080">'JobLocation'</span>,                        fieldLabel: <span style="color: #006080">'JobLocation'</span>,                        width: 850                    },                     {                         xtype: <span style="color: #006080">'textfield'</span>,                         name: <span style="color: #006080">'JobURL'</span>,                         fieldLabel: <span style="color: #006080">'JobURL'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'textfield'</span>,                         name: <span style="color: #006080">'JobBrief'</span>,                         fieldLabel: <span style="color: #006080">'JobBrief'</span>,                         width: 850                     }, {                         xtype: <span style="color: #006080">'textfield'</span>,                         name: <span style="color: #006080">'JobTagline'</span>,                         fieldLabel: <span style="color: #006080">'JobTagline'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'textfield'</span>,                         name: <span style="color: #006080">'JobButtonToolTip'</span>,                         fieldLabel: <span style="color: #006080">'JobButtonToolTip'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'textfield'</span>,                         name: <span style="color: #006080">'JobCompanyName'</span>,                         fieldLabel: <span style="color: #006080">'JobCompanyName'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'textfield'</span>,  <span style="color: #008000">// checkbox makesthe value not come back for some reason</span>                         name: <span style="color: #006080">'HideListing'</span>,                         fieldLabel: <span style="color: #006080">'HideListing'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'datefield'</span>,                         name: <span style="color: #006080">'StartRunDate'</span>,                         fieldLabel: <span style="color: #006080">'StartRunDate'</span>,                         width: 850                     },                     {                         xtype: <span style="color: #006080">'datefield'</span>,                         name: <span style="color: #006080">'EndRunDate'</span>,                         fieldLabel: <span style="color: #006080">'EndRunDate'</span>,                         width: 850                     },                    {                        xtype: <span style="color: #006080">'textfield'</span>,                        name: <span style="color: #006080">'SponsorListId'</span>,                        fieldLabel: <span style="color: #006080">'SponsorListId'</span>,                        width: 850                    }                ]            }        ];

        <span style="color: #0000ff">this</span>.buttons = [            {                text: <span style="color: #006080">'Save'</span>,                action: <span style="color: #006080">'save'</span>            }, {                text: <span style="color: #006080">'Cancel'</span>,                scope: <span style="color: #0000ff">this</span>,                handler: <span style="color: #0000ff">this</span>.close            }        ];

        <span style="color: #0000ff">this</span>.callParent(arguments);    }});</pre>
</div>
<div>Notice we don’t have to mention the StartRunDate’s format because the model has that already.</div>
<div>&#160;</div>
<div>When we run the app and press the “save” button, the actual post that goes back to the asp.net MVC3 controller looks like the following (notice the screen shot of the app first, then what happens when the Save button is pressed)</div>
<div>&#160;</div>
<div><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image4.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb3.png" width="608" height="320" /></a></div>
<div>&#160;</div>
<div><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image5.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb4.png" width="466" height="395" /></a></div>
<div>&#160;</div>
<div>You can see that the date is passed back as Date(1313996400000).&#160; This is actually UTC time so we will need to make sure we check for that on the server.&#160; It’s always a good idea to store all dates on the server in UTC time anyhow.</div>
<div>&#160;</div>
<h3>Posting the Date To the Server (View From ASP.NET)</h3>
<div>&#160;</div>
<div>So let’s take a look at what is coming to the server.&#160; Remember that in the model, we defined what REST api is hit by a post from this model.&#160; In this case, it’s “update: &#8216;SponsorListJobListing/Update&#8217;,”.&#160; So, let’s debug into the C# (asp.net) side and see what is actually coming in.&#160; Here is what we see:</div>
<div>&#160;</div>
<div><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image6.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb5.png" width="624" height="324" /></a></div>
<div>&#160;</div>
<div>Notice that the date comes in very simply as midnight on 8/22/2011 (the date we put in).&#160; The tricky part is we need to store this date as UTC so that when we end it back, it can get converted back to local.&#160; To do this, in our repository class, we have code to convert to UTC as follows:</div>
<div>&#160;</div>
<div><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb6.png" width="594" height="444" /></a></div>
<div>&#160;</div>
<div>&#160;</div>
<div>Your repository will look different, but this is a good example.&#160; Now, notice the StartRunDate will be 8/22/2011 at 7AM.</div>
<div>&#160;</div>
<div><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image8.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb7.png" width="620" height="76" /></a></div>
<p>&#160;</p>
<p>I’m over simplifying a little because it’s calculating UTC based on the Servers time zone, not the browsers.&#160; It would be better to send the timezone of the browser also and then calculate UTC correctly in <a href="http://en.wikipedia.org/wiki/JavaScript">JavaScript</a>, but I just want to give you the idea here.&#160; In my case, I’m always running this app from California and my server is always inCalifornia so at least things stay consistent.&#160; I do realize I’m simplifying and you need to make sure you think this through.</p>
<p>&#160;</p>
<p>Now, when I query the server for the returned data using the same ExtJS data model, the data comes down as follows.&#160; In ASP.NET it looks like this:</p>
<p><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image9.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb8.png" width="244" height="191" /></a></p>
<p>Which is actually different than what was pushed up.&#160; It seems though that when ExtJS displays this, it converts it to local time.</p>
<p>Our browser Grid shows it like this (as we would expect)</p>
<p><a href="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image10.png"><img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://PetersBlogCDN.s3.amazonaws.com/wp/wp/wp-content/uploads/2011/08/image_thumb9.png" width="156" height="112" /></a></p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2011/08/24/getting-extjs-4-date-format-to-behave-properly-in-grid-panel-with-asp-net-mvc3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Automate a Simple Deploy Using DataDude (Visual Studio 2008 Database Edition)</title>
		<link>http://peterkellner.net/2009/10/24/datadude-vs2008-deploy-shortcut/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=datadude-vs2008-deploy-shortcut</link>
		<comments>http://peterkellner.net/2009/10/24/datadude-vs2008-deploy-shortcut/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 15:38:15 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/10/24/datadude-vs2008-deploy-shortcut/</guid>
		<description><![CDATA[Not sure why this was hard, but I wanted to make a trivial command file to deploy my database (or any change to it).&#160; For those of you that don’t know the DataDude project, I have to say it’s one of the coolest tools that has come out the Microsoft Visual Studio Team for a [...]]]></description>
			<content:encoded><![CDATA[<p>Not sure why this was hard, but I wanted to make a trivial command file to deploy my database (or any change to it).&#160; For those of you that don’t know the <a href="http://peterkellner.net/2009/01/17/visual-studio-database-edition-review-sqlserver2008/">DataDude project</a>, I have to say it’s one of the coolest tools that has come out the Microsoft Visual Studio Team for a while.&#160; Basically, in a nutshell, what it does is split’s your database into hundreds of little files.&#160; One for each table, key, foreign key, user, role, etc.&#160; Then, since it is a standard <a href="http://www.microsoft.com/visualstudio/en-us/products/teamsystem/default.mspx">VS2008</a> project, you can keep those files and the project under source control.&#160; The big benefit is that multiple team members can change files and check them in, and everyone’s schema is kept up to date.</p>
<p> <span id="more-372"></span>
<p>So, how does the up to date work?&#160; the way it works is when you get the latest from your version control, you simply right click on the vs2008 project and say “Deploy”.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/HowtoAutomateaSimpleDeployUsingDataDudeV_777E/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/HowtoAutomateaSimpleDeployUsingDataDudeV_777E/image_thumb.png" width="358" height="277" /></a></p>
<p>It’s kind of a hassle though because you have to open the project first, the don this.</p>
<p>Here is a simple one line cmd file that you can use to do this task for you.</p>
<pre class="csharpcode">C:\Windows\Microsoft.NET\Framework\v3.5\MSBuild.exe /t:Deploy
  /p:Configuration=<span class="str">&quot;Debug&quot;</span>;Platform=<span class="str">&quot;Any CPU&quot;</span> /v:normal /m
  <span class="str">&quot;data\ThreePLogicDatabase\ThreePLogicDatabase.dbproj&quot;</span>
pause</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<pre class="csharpcode">That’s it!  hope this helps.</pre>
<p>
  </p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/10/24/datadude-vs2008-deploy-shortcut/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>First Blood Using the New Microsoft Web Platform Installer</title>
		<link>http://peterkellner.net/2009/04/04/microsoftwebplatforminstaller-php-mysql-installation-experience/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=microsoftwebplatforminstaller-php-mysql-installation-experience</link>
		<comments>http://peterkellner.net/2009/04/04/microsoftwebplatforminstaller-php-mysql-installation-experience/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 16:57:55 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[MySql]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/04/04/microsoftwebplatforminstaller-php-mysql-installation-experience/</guid>
		<description><![CDATA[ At MIX09 this year, Scott Guthrie presented the Web Platform Installer which seemed like an easy way to install specific technologies on an IIS server.&#160; At the moment, I need to test an application that uses PHP so I figure this is a good time to try it.&#160; Over the years, I’ve had several [...]]]></description>
			<content:encoded><![CDATA[<p> At <a href="http://live.visitmix.com/">MIX09</a> this year, <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> presented the Web Platform Installer which seemed like an easy way to install specific technologies on an IIS server.&#160; At the moment, I need to test an application that uses PHP so I figure this is a good time to try it.&#160; Over the years, I’ve had several spectacular failures trying to install PHP on IIS.&#160; Now, maybe I will get it right.&#160; So, here we go.</p>
<p>Step 1: Read the walk through ( <a title="http://learn.iis.net/page.aspx/523/web-platform-installer-walkthrough/" href="http://learn.iis.net/page.aspx/523/web-platform-installer-walkthrough/">http://learn.iis.net/page.aspx/523/web-platform-installer-walkthrough/</a> )</p>
<p>Step 2:&#160; Click Install now&#160; (Can’t find PHP, starting searching the web now)&#160; {Note: 4/14/2009. Turns out I missed an easy step.&#160; See bottom of article for that step}</p>
<p>Found this link:&#160; <a href="http://ruslany.net/2009/03/install-php-with-microsoft-web-platform-installer-20/">Install PHP with Microsoft Web Platform Installer 2.0</a></p>
<p>Step 3: Go Here and try again:&#160; <a title="http://php.iis.net/" href="http://php.iis.net/">http://php.iis.net/</a></p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb.png" width="364" height="205" /></a></p>
<p> <span id="more-285"></span>
<p>Well, I still don’t see <a href="http://php.net/">php</a> on the web server choice, but I do see WordPress so I chose to install <a href="http://wordpress.org/">WordPress</a> and said go.&#160; Let’s see what happens now.</p>
<p>It’s saying downloading PHP and also <a href="http://www.mysql.com/">MySQL</a> so maybe this is good.&#160; Patiently waiting…</p>
<p>It’s now asking me for WordPress Setup…</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_3.png" width="440" height="304" /></a></p>
<p>And now for the MySql user (pretty impressive)</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_4.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_4.png" width="452" height="312" /></a></p>
<p>And, Installing WordPress…</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_5.png" width="478" height="330" /></a></p>
<p>&#160;</p>
<p>Oops, failed.&#160; Hmm, wasn’t really intereted in wordpress anyhow, just wanted php.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_6.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_6.png" width="465" height="321" /></a></p>
<p>Sounds like it did not like my credentials to MySql.&#160; I thought I di follow all the directions.&#160; I’ll paste the error here:</p>
<p>providerName: createApp    <br />&#160;&#160;&#160; path: MSDeploy.iisApp/iisApp[@path='wordpress/WPTest']/createApp[@path='wordpress/WPTest']     <br />[9:42:493]Adding dbMySql (Server=localhost;Database=wordpress;uid=pkellner;Pwd=mypass;)     <br />&#160;&#160;&#160; Details:     <br />&#160;&#160;&#160; operationType: Add     <br />&#160;&#160;&#160; providerName: dbMySql     <br />&#160;&#160;&#160; path: Server=localhost;Database=wordpress;uid=pkellner;Pwd=peterk;     <br />[9:42:498]The database &#8216;wordpress&#8217; could not be created..&#160; Retrying operation &#8216;Add&#8217; on object dbMySql (Server=localhost;Database=wordpress;uid=pkellner;Pwd=mypass;).&#160; Attempt 1 of 5.     <br />&#160;&#160;&#160; Details:     <br />&#160;&#160;&#160; originalMessage: The database &#8216;wordpress&#8217; could not be created.     <br />&#160;&#160;&#160; operationType: Add     <br />&#160;&#160;&#160; retryAttempt: 1     <br />&#160;&#160;&#160; retryCount: 5</p>
<p>It does say php installed though successfully and that was my goal.</p>
<p>So, let’s see what is in IIS manager (inetmgr) so, I run inetmgr from a command prompt.</p>
<p>Well, interesting, I see some new stuff including Web Platform Installer at the bottom.&#160; I don’t see anything about php, but I do see a WordPress directory so there is some hope php worked.&#160; Here is what I see.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_7.png" width="557" height="416" /></a></p>
<p>Let’s go into the WordPress base directory and add the only php I know:</p>
<p>Info.php as follows:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">html</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">title</span><span class="kwrd">&gt;</span> PHP Test Script <span class="kwrd">&lt;/</span><span class="html">title</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">head</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;?</span><span class="html">php</span>
<span class="attr">phpinfo</span>( );
?<span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">body</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">html</span><span class="kwrd">&gt;</span> </pre>
<pre class="csharpcode">And, Run it:</pre>
<pre class="csharpcode"><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_8.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_8.png" width="584" height="347" /></a> </pre>
<p>Woohoo!&#160; It worked!!!!!</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_9.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_9.png" width="507" height="436" /></a></p>
<p>Mission Accomplished in about 10 minutes.&#160; Not a perfect experience, but pretty darn good.&#160; BTW, I’m running 64Bit Vista RTM SP1, 4Gig of Ram on a Lenovo W500.</p>
<p>Hope this helps.</p>
<p>&#160;</p>
</p>
<hr />
<p>{Added 4/14/2009, this is the step I missed to do it correctly}</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_10.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_10.png" width="370" height="275" /></a></p>
<p>And then select the PHP checkbox:</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_11.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstBloodUsingtheNewMicrosoftWebPlatfor_894B/image_thumb_11.png" width="366" height="272" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/04/04/microsoftwebplatforminstaller-php-mysql-installation-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>First Experience with Visual Studio 2008 Database Edition, I love it!!!</title>
		<link>http://peterkellner.net/2009/01/17/visual-studio-database-edition-review-sqlserver2008/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=visual-studio-database-edition-review-sqlserver2008</link>
		<comments>http://peterkellner.net/2009/01/17/visual-studio-database-edition-review-sqlserver2008/#comments</comments>
		<pubDate>Sat, 17 Jan 2009 22:06:11 +0000</pubDate>
		<dc:creator>Peter Kellner</dc:creator>
				<category><![CDATA[Best Practices]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[Sql Server]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://peterkellner.net/2009/01/17/visual-studio-database-edition-review-sqlserver2008/</guid>
		<description><![CDATA[As a developer who has spent much of my life doing DBA type work, I really appreciate the simplicity and elegance of what Microsoft Visual Studio Team has put together with the Database Edition and can be seen for sale here as the 
Microsoft Visual Studio 2010 Premium with MSDN Download &#8211; Download Direct from [...]]]></description>
			<content:encoded><![CDATA[<p>As a developer who has spent much of my life doing DBA type work, I really appreciate the simplicity and elegance of what <a href="http://msdn.microsoft.com/en-us/vsts2008/products/bb933747.aspx">Microsoft Visual Studio Team</a> has put together with the <a href="http://blogs.msdn.com/gertd/archive/2007/11/21/visual-studio-team-system-2008-database-edition.aspx">Database Edition</a> and can be seen for sale here as the </p>
<p><a href="http://click.linksynergy.com/fs-bin/click?id=cLhVEJVzoSE&#038;offerid=166833.737&#038;type=2&#038;subid=0">Microsoft Visual Studio 2010 Premium with MSDN Download &#8211; Download Direct from Microsoft</a><IMG border=0 width=1 height=1 src="http://ad.linksynergy.com/fs-bin/show?id=cLhVEJVzoSE&#038;bids=166833.737&#038;type=2&#038;subid=0" ></p>
<p> I&#8217;ll first try and explain in a nutshell what it is.&#160; Then I&#8217;ll go through an example of creating a Visual Studio Database Project out of a site I&#8217;ve been working on to show the steps.&#160; Finally, I&#8217;ll give a short summary reliving the experience and giving you some other pointers that may help you get through the experience.</p>
<h3>What is VS2008 Database Edition?</h3>
<p>Basically, what VS2008 does is to first process your existing schema into hundreds (maybe thousands) of little files.&#160; That is, each file is one database thing. That thing might be a table definition, a stored procedure, a trigger, a constraint, a foreign key, etc.&#160; The beauty of this is that now, each thing can be tracked separately.&#160; Say for example, you want to update just one table and someone else on your team wants to update another table in the same schema.&#160; Since the files are now separate files, it&#8217;s no problem.&#160; When you grab the latest changes from source control, you will get your friends changes and he will get yours.&#160; Very very clean!</p>
<div id='extendedEntryBreak' name='extendedEntryBreak'></div>
<p>Also, it has a very powerful comparison engine.&#160; Say you update your data outside of this project.&#160; VS2008 Database Edition will compare your definitions in all these little files with either a sql script you generate, or it will connect to an external database and compare to that.&#160; Me personally, I like to use a tool called <a href="http://www.sqlmanager.net/en/products/studio/mssql">SqlManager</a> to manage my data.&#160; I can continue to do that, then when I&#8217;ve made my changes, I can simply connect VS2008 Database Edition to my updated development database and it will automatically figure out the changes.</p>
<p>So, you may ask, what version do I need to run this of Visual Studio?&#160; The answer is in this link:&#160; <a title="http://msdn.microsoft.com/en-us/vs2008/products/cc149003.aspx" href="http://msdn.microsoft.com/en-us/vs2008/products/cc149003.aspx">http://msdn.microsoft.com/en-us/vs2008/products/cc149003.aspx</a></p>
<h3>Here We Go, Let&#8217;s do an Example</h3>
<p>So, first, I will open my existing solution which has a web project in it, a data access project as well as other projects.&#160; Then, I create the new Database solution by saying File/Open/New Project/Database Project.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb.png" width="395" height="208" /></a></p>
<p>Then, we follow the wizard&#8230;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_3.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_3.png" width="244" height="182" /></a></p>
<p>Taking defaults&#8230;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_4.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_4.png" width="244" height="182" /></a></p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_5.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_5.png" width="244" height="182" /></a></p>
<p>Now, I choose my schema.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_6.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_6.png" width="244" height="182" /></a></p>
<p>Press Start&#8230;</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_7.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_7.png" width="244" height="182" /></a></p>
<p>Once you&#8217;ve done that, you&#8217;ll now have your schema spread out across your project in little files.&#160; Below is what the &quot;file based&quot; view of your schema looks like.</p>
<p><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_8.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_8.png" width="412" height="295" /></a></p>
<p>Notice that the file we are looking at also includes comments for both the table and the columns using the standard extended property documentation format as follows:</p>
<pre class="csharpcode"><span class="kwrd">GO</span>
<span class="kwrd">EXECUTE</span> sp_addextendedproperty @name = N<span class="str">'MS_Description'</span>,
@<span class="kwrd">value</span> = N<span class="str">'tracks all changes from each camp

title;link;guid;pubDate;category;description'</span>, @level0type = N<span class="str">'SCHEMA'</span>,
@level0name = N<span class="str">'dbo'</span>, @level1type = N<span class="str">'TABLE'</span>,
@level1name = N<span class="str">'CampFeed'</span>;

<span class="kwrd">GO</span>
<span class="kwrd">EXECUTE</span> sp_addextendedproperty @name = N<span class="str">'MS_Description'</span>,
@<span class="kwrd">value</span> = N<span class="str">'if true, this is the main news feed from the site.
there should only be one main news feed from any site.  this would
not be feeds like twitter'</span>, @level0type = N<span class="str">'SCHEMA'</span>,
@level0name = N<span class="str">'dbo'</span>,
@level1type = N<span class="str">'TABLE'</span>, @level1name = N<span class="str">'CampFeed'</span>,
@level2type = N<span class="str">'COLUMN'</span>, @level2name = N<span class="str">'PrimaryFeed'</span>;</pre>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode">Now, when you actually build the project as follows:</pre>
<pre class="csharpcode"><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_9.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_9.png" width="242" height="244" /></a> </pre>
<p>it will generate the full script combining all the files back into one again. Here is where it puts it:</p>
<pre class="csharpcode">&#160;</pre>
<pre class="csharpcode"><a href="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_10.png"><img style="border-right-width: 0px; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" border="0" alt="image" src="http://peterkellner.net/FilesForWebDownload/FirstExperiencewithVisualStudio2008Datab_A011/image_thumb_10.png" width="414" height="332" /></a> </pre>
<pre class="csharpcode">&#160;</pre>
<p>So, that&#8217;s about it for now. I haven&#8217;t gone into any of the ways to compare and update your schema based on external changes, but we can leave that for another post.</p>
<p>To see a great video by <a href="http://blog.hundhausen.com/">Richard Hundhausen</a>, President of <a title="http://www.accentient.com/" href="http://www.accentient.com/">Accentient</a>, a <a href="http://msdn.microsoft.com/en-us/vsts2008/aa718934.aspx">Team Systems</a> Consulting company, go to this link:&#160; <a title="http://msdn.microsoft.com/en-us/vsts2008/cc659682.aspx" href="http://msdn.microsoft.com/en-us/vsts2008/cc659682.aspx">http://msdn.microsoft.com/en-us/vsts2008/cc659682.aspx</a></p>
<p>Also, if you are using Sql Server 2008, make sure you install visual studio 2008 sp1, then go to this link and install the download:&#160; <a title="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;displaylang=en" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=bb3ad767-5f69-4db9-b1c9-8f55759846ed&amp;displaylang=en</a></p>
<h3>Conclusions</h3>
<p>From what I can tell, this Visual Studio Database Edition will be a huge help in building database schema&#8217;s and database programs (sp&#8217;s, triggers,etc.) in a collaborative environment.&#160;&#160; If you have the license to use this, I strongly recommend it.&#160; It is definitely going to be part of my tool kit for now on.&#160; Even if I&#8217;m the only author in the project.</p>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
]]></content:encoded>
			<wfw:commentRss>http://peterkellner.net/2009/01/17/visual-studio-database-edition-review-sqlserver2008/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 29/36 queries in 0.006 seconds using disk: basic
Content Delivery Network via Amazon Web Services: S3: PetersBlogCDN.s3.amazonaws.com

Served from: peterkellner.net @ 2012-05-22 10:01:45 -->
