<?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>Philip Roche &#187; sql server</title>
	<atom:link href="http://www.philroche.net/category/sql-server/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philroche.net</link>
	<description>All things Geek</description>
	<lastBuildDate>Sat, 05 Jun 2010 15:24:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Web Application installations with Wix&#8230;. Awesome</title>
		<link>http://www.philroche.net/archives/web-application-installations-with-wix-awesome/</link>
		<comments>http://www.philroche.net/archives/web-application-installations-with-wix-awesome/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 12:11:14 +0000</pubDate>
		<dc:creator>philroche</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[karova]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[wix]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.philroche.net/archives/web-application-installations-with-wix-awesome/</guid>
		<description><![CDATA[This week I set off with the goal of making one of our web applications alot easier to deploy. The tools I chose were -

Web Application Installer (WAI)

Wix (Windows Installer XML)
WixEdit

I'd played with all three before but never really got past prototype stage. I've spent the last day learning wix and all the elements relevant [...]]]></description>
			<content:encoded><![CDATA[<p>This week I set off with the goal of making one of our web applications alot easier to deploy. The tools I chose were -</p>
<ol>
<li><a href="http://www.codeplex.com/wai">Web Application Installer (WAI)<br />
</a></li>
<li><a href="http://wix.sourceforge.net/">Wix</a> (Windows Installer XML)</li>
<li><a href="http://wixedit.sourceforge.net/">WixEdit</a></li>
</ol>
<p>I'd played with all three before but never really got past prototype stage. I've spent the last day learning wix and all the elements relevant to me. The Web Application Installer is collection of scripts and a template for different types of web applications. Firstly you use WAI to generate a list of files to install and the use WixEdit to edit that list and many other properties of the wix installation. Once happy with the configuration of the installation WixEdit will generate an msi for installation on your target machine. They truly are an excellent collection of tools. I now have an msi installer that sets up a web site in IIS, sets the ASP.NET version to 2, sets all the required permissions, creates a DB in SQL Server Express (specifying where to save the mdf and ldf files too) and changes the connection string in web.config accordingly. Todays quota of job satisfaction has now been achieved - saving about an hour per install (I've to install this app 28 times for different clients so the work was definitely worth while).</p>
<p>One huge pit fall which made me silly amounts of angry was that the SQL script you use to generate the tables and initial data for your database MUST be saved in Unicode (UTF-8). If it's not then wix won't be able to read it. I lost 3 hours yesterday with this!!!! as SQL server management studio express by default saves to UCS-2 Big Endian. Very little documentation on this fact so hopefully this post will help a little.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.philroche.net/archives/web-application-installations-with-wix-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL stored procedure variables</title>
		<link>http://www.philroche.net/archives/mysql-stored-procedure-variables/</link>
		<comments>http://www.philroche.net/archives/mysql-stored-procedure-variables/#comments</comments>
		<pubDate>Thu, 09 Nov 2006 15:02:34 +0000</pubDate>
		<dc:creator>philroche</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://www.philroche.net/archives/mysql-stored-procedure-variables/</guid>
		<description><![CDATA[A few months ago we wrote a mammoth we application which had an SQL Express DB. We used stored procedures, and after writing 170 of them(I didn't write all of them of course), I was quite used to the way that variables and so on worked in SQL Server.
We've started a new project where the [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago we wrote a mammoth we application which had an SQL Express DB. We used stored procedures, and after writing 170 of them(I didn't write all of them of course), I was quite used to the way that variables and so on worked in SQL Server.</p>
<p>We've started a new project where the DB is MySQL 5. Again we are using stored procedures, but variables work differently.</p>
<p><strong>Setting a variable in SQL Server</strong></p>
<pre class="sql">DECLARE @oldPageGUID uniqueidentifier;
<span style="color: #993333; font-weight: bold;">SET</span> @oldPageGUID = <span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold;">SELECT</span> mPage.id <span style="color: #993333; font-weight: bold;">FROM</span> mPage <span style="color: #993333; font-weight: bold;">WHERE</span> mPage.title = @passedtitle<span style="color: #66cc66;">&#41;</span>;</pre>
<p><strong>Setting a variable in MySQL Server</strong></p>
<pre class="sql">DECLARE dateAdded TIMESTAMP;
<span style="color: #993333; font-weight: bold;">SELECT</span> lusers.dateadded <span style="color: #993333; font-weight: bold;">INTO</span> dateAdded <span style="color: #993333; font-weight: bold;">FROM</span> lusers <span style="color: #993333; font-weight: bold;">WHERE</span> lusers.id= id;</pre>
<p>You can see that setting the value of the variable is done completely differently (<a href="http://dev.mysql.com/doc/refman/5.0/en/select-into-statement.html">MySQL Docs for SELECT ... INTO Statement</a>). Two other things that confused me for a while was that there is no character prefixed to the variables in MySQL as in SQL server (@) and that there is no uniqueidentifier data-type for GUIDs
</p>
<p><!--ae1d2884bfb4bff2ed85ea1ee2fa0e70-->
</p>
<p><!--e05928ff129b1df9ce39fb32516a5a7e-->
</p>
<p><!--a632d3458faf5c37ba881184ae937ed1-->
</p>
<p><!--caccd4db61bac2eaf5723b7130edd77b-->
</p>
<p><!--e05928ff129b1df9ce39fb32516a5a7e-->
</p>
<p><!--ae1d2884bfb4bff2ed85ea1ee2fa0e70-->
</p>
<p><!--a632d3458faf5c37ba881184ae937ed1--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.philroche.net/archives/mysql-stored-procedure-variables/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
