<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Paul Bunting - Blog</title>
	<atom:link href="http://developtheweb.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://developtheweb.wordpress.com</link>
	<description>Just another WordPress.com site</description>
	<lastBuildDate>Sat, 04 Feb 2012 14:15:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='developtheweb.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Paul Bunting - Blog</title>
		<link>http://developtheweb.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://developtheweb.wordpress.com/osd.xml" title="Paul Bunting - Blog" />
	<atom:link rel='hub' href='http://developtheweb.wordpress.com/?pushpress=hub'/>
		<item>
		<title>LINQ to SQL and Entity Framework… issues I have encountered with EF.</title>
		<link>http://developtheweb.wordpress.com/2009/02/16/linq-to-sql-and-entity-framework%e2%80%a6-issues-i-have-encountered-with-ef/</link>
		<comments>http://developtheweb.wordpress.com/2009/02/16/linq-to-sql-and-entity-framework%e2%80%a6-issues-i-have-encountered-with-ef/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 16:03:01 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Microsoft .NET Development]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/02/16/linq-to-sql-and-entity-framework%e2%80%a6-issues-i-have-encountered-with-ef</guid>
		<description><![CDATA[For the past 6 months or so there has been various discussions raised on the LINQ to SQL (released with .NET 3.5) vs. Entity Framework (released with .NET 3.5 SP1). Including several blog posts claiming that LINQ to SQL is dead (here, here and here are a few of them) and that LINQ to SQL [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=8&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!464" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" alt="" width="0" height="0" align="right" /></div>
<p>For the past 6 months or so there has been various discussions raised on the LINQ to SQL (released with .NET 3.5) vs. Entity Framework (released with .NET 3.5 SP1). Including several blog posts claiming that LINQ to SQL is dead (<a href="http://oakleafblog.blogspot.com/2008/05/is-adonet-team-abandoning-linq-to-sql.html" target="_blank">here</a>, <a href="http://ayende.com/Blog/archive/2008/10/31/microsoft-kills-linq-to-sql.aspx" target="_blank">here</a> and <a href="http://codebetter.com/blogs/david.hayden/archive/2008/10/31/linq-to-sql-is-dead-read-between-the-lines.aspx" target="_blank">here</a> are a few of them) and that LINQ to SQL is to be replaced by EF; these blogs were a result of an <a href="http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx" target="_blank">ADO.NET team blog post</a>.</p>
<p>This is probably in part to do with the fact that LINQ to SQL was written by the C# development team, and EF is developed by the ADO.NET team, and they were both developed in parallel.</p>
<p>The ADO.NET team started development of the Entity Framework in 2003; at around the same time the C# design group embarked on developing a LINQ to SQL extension as a “stand-in” for the abandoned ObjectSpaces O/RM tool. I have read that LINQ to SQL was mainly written to help aid the development of LINQ in particular for the AND/OR query clauses.</p>
<p>Apparently the two projects were developed with little communication between the teams and in 2006 the ADO.NET team gained ownership of the LINQ to SQL and LINQ to DataSet implementations, adding LINQ to Entities into the mix.</p>
<p>The Entity Framework was originally meant to be included in .NET 3.5, however it was removed from early betas. It was later included in .NET 3.5 SP1. LINQ to SQL was originally developed to work with other databases, but prior to it’s release (<a href="http://blogs.msdn.com/mattwar/archive/2008/05/04/mocks-nix-an-extensible-linq-to-sql-datacontext.aspx" target="_blank">for non-technical reasons</a>) it was restricted to work with MS SQL Server only.</p>
<p>Having been playing with LINQ to SQL for a bit I found it very easy to implement and program against. Pretty much just dragging my tables into a DBML and by <a href="http://archsoftnet.spaces.live.com/blog/cns!E222DD65C0999331!462.entry" target="_blank">customising the MySettings class</a> it allowed me to use the same connection settings as previous datasets and non-.NET apps. It made it very easy to integrate some LINQ to SQL with existing application development.</p>
<p>The database I am currently developing with has 364 tables (with around 850 FK links between them). Though dropping all of these onto a LINQ to SQL DBML file takes a while for Visual Studio to process, it works. Customising the DBML would be a bit of a pain however, given the lack of update facility in the designer (though there is a tool I am looking at <a title="http://www.huagati.com/dbmltools/" href="http://www.huagati.com/dbmltools/" target="_blank">http://www.huagati.com/dbmltools/</a>, which would also allow me to standardise legacy naming conventions).</p>
<p>Would be nice to be able to spread the tables across several DBML files, allowing commonly used tables to be included in each LINQ to SQL class. Not had much chance to look at this but seems to cause problems when just dropping the tables into separate files.</p>
<p><span style="color:#800000;">Dropping the same tables into an Entity Data Model takes around the same time, but crucially any time I attempt to update the diagram in the designer, or often just selecting a table, Visual Studio bombs out, crashing.</span></p>
<p>There are bound to be several benefits to using the EF, such as: - </p>
<ul>
<li>Full provider model with support for multiple RDBMSs, including SQL Server Compact.</li>
<li>Not tied to a one:one relationship between entities and database tables.</li>
<li>Support for Table per Class and Table per Concrete Class hierarchy models.</li>
<li>Support for entity-splitting and complex types.</li>
</ul>
<p>Though it may be the most serious issue I have encountered, this is not the only issue I have had with EF.</p>
<p>One common thing I do through-out code is check and see if changes have been made to a dataset or LINQ to SQL model. something easily achieved in both (&lt;context&gt;.GetChangeSet.Deletes, etc in LINQ to SQL and &lt;DataTable&gt;.GetChanges for DataTables).</p>
<p>It took me a fair amount of research to find how to do it for an Entity Data Model… and disappointingly it is not as simple a command: -</p>
<blockquote><p><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">Dim</span> changes  = _<br />
     &lt;context&gt;.ObjectStateManager.GetObjectStateEntries( _<br />
            EntityState.Added <span style="color:#0000ff;">Or</span> _<br />
            EntityState.Modified <span style="color:#0000ff;">Or</span> _<br />
            </span></span><span style="font-family:Courier New;font-size:x-small;">EntityState.Deleted  _<br />
            ).[Select](<span style="color:#0000ff;">Function</span>(o) o.Entity).OfType( _<br />
                  <span style="color:#0000ff;">Of</span> &lt;my table&gt;)</span></p></blockquote>
<p>Another problem I have had is to do with the connection settings. When you use an Entity Data Model, the connection string is not added to the MySettings class, it is just added to app.config. This make it a bit more involved to share connection settings in a common method (as discussed <a href="http://archsoftnet.spaces.live.com/blog/cns!E222DD65C0999331!462.entry" target="_blank">here</a>). Plus when you go into the entity model, the connection setting is not selectable (or editable) in the design view.</p>
<p>Overall both are a good base and are much improved over having to write my own custom functions to build DataSets and DataAdapter from the large database schema. With both LINQ to SQL and LINQ to Entity, I can get past having to embed query strings in a DataAdpter. Building some classes that achieve the same thing but allow them to be debugged and syntax checked by Visual Studio when a schema update occurs.</p>
<p>As for which to use… Entity Framework looks to be the focus of future Microsoft developments in Visual Studio 2010, but in Visual Studio 2008 I like LINQ to SQL because it seems more integrated with the development environment, development is easier and it doesn’t crash Visual Studio! I do hope that the Entity Framework issues are fixed in .NET 4.0.</p>
<p>For now I will be continuing with LINQ to SQL, but ensuring it is separated out as much as I can, with as little customisation as possible, so that if need it can be easily replaced by Entity Data Models in the future.</p>
<p>Paul B<br />
<em>MCP</em></p>
<p>PS Eric Nelson posted a small blog and slides on Entity framework (Battle of the ORMs slides and links) today at <a title="http://geekswithblogs.net/iupdateable/archive/2009/02/16/battle-of-the-orms-slides-and-links.aspx" href="http://geekswithblogs.net/iupdateable/archive/2009/02/16/battle-of-the-orms-slides-and-links.aspx" target="_blank">http://geekswithblogs.net/iupdateable/archive/2009/02/16/battle-of-the-orms-slides-and-links.aspx</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/8/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/8/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/8/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=8&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/02/16/linq-to-sql-and-entity-framework%e2%80%a6-issues-i-have-encountered-with-ef/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />
	</item>
		<item>
		<title>Customising MySettings class in .NET to override a connection string.</title>
		<link>http://developtheweb.wordpress.com/2009/02/15/customising-mysettings-class-in-net-to-override-a-connection-string/</link>
		<comments>http://developtheweb.wordpress.com/2009/02/15/customising-mysettings-class-in-net-to-override-a-connection-string/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 23:16:00 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Microsoft .NET Development]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/02/15/customising-mysettings-class-in-net-to-override-a-connection-string</guid>
		<description><![CDATA[With .NET 2.0 came the “My” classes, a useful feature of the classes was the integration into the “app.config” file and project properties for configuration of settings, including connection strings. In order to maintain compatibility with previous app that share database configuration settings with new modules and developments, it would be nice to be able [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=7&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!462" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" alt="" align="right" width="0" height="0" /></div>
<p>With .NET 2.0 came the “My” classes, a useful feature of the classes was the integration into the “app.config” file and project properties for configuration of settings, including connection strings.</p>
<p>In order to maintain compatibility with previous app that share database configuration settings with new modules and developments, it would be nice to be able to override settings. It would be nice to use customised connection settings yet seamlessly use built in features of Visual Studio to set connection strings for DataAdapters, LINQtoSQL, etc.</p>
<p>Thankfully this is easily achieved in .NET 2.0 and onwards (with the exception of Entity Models, released with .NET 3.5 SP1, which I will go into in another blog).</p>
<p>To modify simply open the project properties, and switch to the the settings window and click on the “View Code” button.</p>
<p><a rel="WLPP" href="http://developtheweb.files.wordpress.com/2009/02/c2618cc2c8f40e2939ce893a04ab2fee.jpg"><img src="http://developtheweb.files.wordpress.com/2009/02/c2618cc2c8f40e2939ce893a04ab2fee.jpg?w=300" border="0" alt="" /></a></p>
<p>This will add a partial class for “MySettings” to your project. From which it is easy to override any settings.</p>
<p>To override a particular property or group of properties is easy by overriding the “Item” property: -</p>
<blockquote><p><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">Partial Friend NotInheritable Class</span> MySettings<br />
    <span style="color:#0000ff;">Default Public Overloads Overrides Property</span> Item(<span style="color:#0000ff;">ByVal</span> propertyName <span style="color:#0000ff;">As String</span>) <span style="color:#0000ff;">As Object</span><br />
        </span></span><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">Get<br />
            If</span> propertyName = <span style="color:#800000;">&#8220;MyDatabase&#8221;</span> </span></span><span style="font-family:Courier New;"><span style="font-size:x-small;"><span style="color:#0000ff;">Then<br />
                Return</span> Connection.GetConnectionString </span><br />
<span style="font-size:x-small;">            </span></span><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">Else<br />
                Return</span> <span style="color:#0000ff;">MyBase.</span>Item(propertyName)<br />
            </span></span><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">End If<br />
        End Get<br />
        Set</span>(<span style="color:#0000ff;">ByVal</span> value <span style="color:#0000ff;">As Object</span>)<br />
</span></span><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">            If</span> propertyName = <span style="color:#800000;">&#8220;MyDatabase&#8221;</span> </span></span><span style="font-family:Courier New;"><span style="font-size:x-small;"><span style="color:#0000ff;">Then<br />
                </span>Connection.SetConnectionString(value) </span><br />
<span style="font-size:x-small;">            </span></span><span style="font-size:x-small;"><span style="font-family:Courier New;"><span style="color:#0000ff;">Else<br />
                MyBase<span style="color:#000000;">.Item(propertyName)</span> = value</span><br />
            <span style="color:#0000ff;">End If</span></span></span></p>
<p><span style="font-size:x-small;"><span style="font-family:Courier New;">        <span style="color:#0000ff;">End Set<br />
    End Property<br />
End Class</span></span></span></p></blockquote>
<p>Where “Connection” is a custom class build to use shared legacy application connection settings.</p>
<p>Paul B<br />
<em>MCP</em></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=7&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/02/15/customising-mysettings-class-in-net-to-override-a-connection-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://developtheweb.files.wordpress.com/2009/02/c2618cc2c8f40e2939ce893a04ab2fee.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>T-SQL Foreign Key ON DELETE CASCADE and ON DELETE SET NULL – Creating an alternative INSTEAD OF DELETE TRIGGER that allows multiple cascading paths&#8230;</title>
		<link>http://developtheweb.wordpress.com/2009/01/23/t-sql-foreign-key-on-delete-cascade-and-on-delete-set-null-%e2%80%93-creating-an-alternative-instead-of-delete-trigger-that-allows-multiple-cascading-paths/</link>
		<comments>http://developtheweb.wordpress.com/2009/01/23/t-sql-foreign-key-on-delete-cascade-and-on-delete-set-null-%e2%80%93-creating-an-alternative-instead-of-delete-trigger-that-allows-multiple-cascading-paths/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 19:12:09 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Microsoft SQL Server Scripts and Development]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/01/23/t-sql-foreign-key-on-delete-cascade-and-on-delete-set-null-%e2%80%93-creating-an-alternative-instead-of-delete-trigger-that-allows-multiple-cascading-paths</guid>
		<description><![CDATA[… to avoid “Error message 1785 occurs when you create a FOREIGN KEY constraint that may cause multiple cascade paths” In most cases if you need to support linking of more than one ID from one table into another table, you would use an intermediary table, this allows any number of links to be established [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=3&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!458" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /></p>
<p><font color="#0080c0" size="3">… to avoid “Error message 1785 occurs when you create a FOREIGN KEY constraint that may cause multiple cascade paths”</font> </p>
<p><a href="http://developtheweb.files.wordpress.com/2009/01/96922d0abf276d68a8772f7fc464be72.jpg" rel="WLPP"><img src="http://developtheweb.files.wordpress.com/2009/01/96922d0abf276d68a8772f7fc464be72.jpg?w=300" align="right" border="0" /></a> In most cases if you need to support linking of more than one ID from one table into another table, you would use an intermediary table, this allows any number of links to be established and details of each link can be supplemented with additional details. </p>
<p><a href="http://developtheweb.files.wordpress.com/2009/01/0a5dae1dc60c3ad586017a9c5db72237.jpg" rel="WLPP"><img src="http://developtheweb.files.wordpress.com/2009/01/0a5dae1dc60c3ad586017a9c5db72237.jpg?w=300" align="left" border="0" /></a> However when maintaining and upgrading an existing database that has been around for many years, or even designing a new one, were there will only ever be a need to link in a specific number of IDs, it may be the case that the IDs are placed within the other table directly.  </p>
<p><p>Doing this prevents the ability for SQL to use the ON DELETE CASCADE and ON DELETE SET NULL from working. </p>
<p><a href="http://developtheweb.files.wordpress.com/2009/01/cf08a500553d9c3f4ecd11e15e7c569c.jpg" rel="WLPP"><img src="http://developtheweb.files.wordpress.com/2009/01/cf08a500553d9c3f4ecd11e15e7c569c.jpg?w=300" align="right" border="0" /></a> Indeed even if there is only the one ID linked in, but there is more than one round table link you cannot have multiple ON DELETE CASCADE foreign keys established between the tables because it will also fail. Both these examples give the error “Error message 1785 occurs when you create a FOREIGN KEY constraint that may cause multiple cascade paths”. </p>
<p>I recently embarked on upgrading an existing database to include foreign keys relationships (previously controlled by software only), so that we could introduce full support for merge replication. </p>
<p>The database includes over 360 tables with around 860 relationships to be establish between tables, it is used by over 4500 users in a large number of organisations, with around 70 modules (or applications) accessing the data. </p>
<p>As the applications have been designed and written over the past 10 years by several developers there is no way to guarantee that all the relationships between tables are being enforced correctly… Leaving aside the creation of the FKs and the verification of existing data for another blog, I needed a way to maintain compatibility with all the applications currently using the database. The only way to do this while properly enforcing the foreign keys would be to delete or set to NULL the appropriate linked data on deletion of a row, rather than rely on the application to perform the action. </p>
<p>Having searched for quite a while I found that there was many examples of people recommending using an INSTEAD OF DELETE TRIGGER, to accomplish it, though I could not find any examples. After searching for some time the only examples I found contain hard coded references to linked tables. This is no way ideal and would be a nightmare to maintain with over 860 foreign key links between over 360 tables, which are added to and modified on a regular basis as the applications continue to grow. </p>
<p>Anyway to cut a long story short and get to the code I wrote a TRIGGER that would satisfy my needs, based on a few assumptions. </p>
<ol>
<li>If a Foreign Key column is nullable I am assuming it is not dependant on the Primary Key data and should be set to NULL rather than deleted.
<li>If the Foreign Key does not support NULLs then the data must be dependant on a valid link and will be deleted… obviously in this case I am assuming that all of the FKs that do not support NULLs are not to be set to a default value from the PK table.
<li>Within the TRIGGER I am will be checking if the FK constraint has a referential action, is disable, is trusted (enforced) and also isn’t a link back to the PK table itself.
<li>The Trigger is designed to fail if fired against a table that has a multi-column Primary Key. </li>
</ol>
<p>It is worth noting when using a trigger it can be run on multiple rows and is not run for each row deleted, so must handle this </p>
<p>Now I am a bit short of time tonight so I am just going to just show the source of what I have done and assume you will be able to interpret it…. </p>
<p>The trigger will cycle through all Foreign keys based on the tables name and the primary key column name. It then deletes or updates the dependant data as appropriate, as it does so (assuming the same trigger is on the dependant tables) if the dependant tables have an update or delete trigger on them it will in turn trigger that causing a cascade effect… <strong>As a result of this it could potentially result in a long loop so needs to be used with caution and the database’s foreign keys need to be established carefully</strong>. </p>
<p><strong><font color="#ff0000">You should not use this trigger if you are unsure, and I bear no responsibility for any data that is lost as a result of it’s usage! The trigger is based on T-SQL for MS SQL Server 2005, INSTEAD OF DELETE does not work in MS SQL 2000 and I have not tested it on MS SQL 2008.</font></strong> </p>
<p>The trigger looks something like the following; it is based on a table called [Table_1] with a Primary Key column that is either an <em>integer or varchar</em> called [ID], I will be adding it to all tables I’ll be writing a script that just runs through all the tables adding it: &#8211; </p>
<p align="left"><font color="#ff0000" size="1"><strong>Code revised 31st Jan. 2009</strong></font> <span style="font-size:10pt;font-family:'Courier New';"></p>
<p style="margin:0;"><font size="1"> </font> </p>
<p style="margin:0;"><font size="1">IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N&#8217;[dbo].[TRIG_PK_Table_1_Delete_FKs]&#8216;)) </font></p>
<p style="margin:0;"><font size="1">DROP TRIGGER [dbo].[TRIG_PK_Table_1_Delete_FKs] </font></p>
<p style="margin:0;"><font size="1">GO </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">/** </p>
<p style="margin:0;"><font size="1">CODED BY: Paul Bunting (</font><a href="http://www.paulbunting.com/"><font size="1">http://www.paulbunting.com/</font></a><font size="1">) </font></p>
<p style="margin:0;"><font size="1">Created: 23/01/2009 </font></p>
<p style="margin:0;"><font size="1">Modified: 31/01/2009 </font></p>
<p style="margin:0;"><font size="1">**/<br /></font>CREATE TRIGGER TRIG_PK_Table_1_Delete_FKs ON dbo.Table_1 </p>
</p>
<p></font></p>
<p style="margin:0;"><font size="1">INSTEAD OF DELETE </font></p>
<p style="margin:0;"><font size="1">AS </font></p>
<p style="margin:0;"><font size="1">BEGIN </font></p>
<p style="margin:0;"><font size="1">    SET NOCOUNT ON </font></p>
<p style="margin:0;"><font size="1">      PRINT &#8216;***************************************************&#8217; </font></p>
<p style="margin:0;"><font size="1">      PRINT &#8216;RUNNING &#8211; TRIG_PK_Table_1_Delete_FKs&#8217; <br />  <br />      &#8212; before doing anything lets check we <br />      &#8212; actually have something to delete! <br />      DECLARE @Counter_DELETED_ROWS INT <br />      SELECT @Counter_DELETED_ROWS = COUNT([EQUIPMENTID]) FROM DELETED </font></p>
<p style="margin:0;"><font size="1">      IF (@Counter_DELETED_ROWS &lt;= 0) <br />      BEGIN <br />          PRINT &#8221; <br />          PRINT &#8217;0 records deleted&#8217; <br />          PRINT &#8221; <br />      END <br />      ELSE <br />      BEGIN    </font></p>
<p style="margin:0;"><font size="1">    &#8212; 1) we only wish to deal with tables that have one Primary Key&#8230; </font></p>
<p style="margin:0;"><font size="1">    &#8211;    so lets check that this table has only one Primary Key </font></p>
<p style="margin:0;"><font size="1">    DECLARE @Counter_PKs INT </font></p>
<p style="margin:0;"><font size="1">    SELECT @Counter_PKs = COUNT(Col.Column_Name) FROM <br />            INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col </font></p>
<p style="margin:0;"><font size="1">            INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab </font></p>
<p style="margin:0;"><font size="1">            ON  Col.Constraint_Name = Tab.Constraint_Name AND <br />            Col.Table_Name = Tab.Table_Name </font></p>
<p style="margin:0;"><font size="1">      WHERE Tab.Constraint_Type = &#8216;PRIMARY KEY&#8217; AND <br />            Col.Table_Name = &#8216;Table_1&#8242; </font></p>
<p style="margin:0;"><font size="1">      </font></p>
<p style="margin:0;"><font size="1">      &#8212; 2) Verify only 1 found </font></p>
<p style="margin:0;"><font size="1">      PRINT &#8216;  Found &#8216; + CONVERT(VARCHAR(255), @Counter_PKs) + <br />            &#8216; primary keys in table&#8217; </font></p>
<p style="margin:0;"><font size="1">      IF (NOT (@Counter_PKs = 1)) </font></p>
<p style="margin:0;"><font size="1">      BEGIN </font></p>
<p style="margin:0;"><font size="1">            &#8212; Lets throw an error if this trigger has been established  </font></p>
<p style="margin:0;"><font size="1">            &#8212; against a table with more than one Primary Key, could </font></p>
<p style="margin:0;"><font size="1">            &#8212; alter this later to handle them but no requirement to </font></p>
<p style="margin:0;"><font size="1">            &#8212; do so at the moment </font></p>
<p style="margin:0;"><font size="1">            DECLARE @tn varchar(4000) </font></p>
<p style="margin:0;"><font size="1">            SELECT @tn = object_name(parent_obj) <br />            FROM sysobjects WHERE id = @@procid </font></p>
<p style="margin:0;"><font size="1">            SET @tn = &#8216;Casscade deletes not allowed for this &#8216; + <br />                   &#8216;table due to multiple primary key columns: &#8216; + @tn </font></p>
<p style="margin:0;"><font size="1">            PRINT @tn </font></p>
<p style="margin:0;"><font size="1">            IF EXISTS(SELECT TOP(1) * from deleted)  </font></p>
<p style="margin:0;"><font size="1">                  RAISERROR (@tn, 16, 1)    </font></p>
<p style="margin:0;"><font size="1">      END </font></p>
<p style="margin:0;"><font size="1">      ELSE </font></p>
<p style="margin:0;"><font size="1">      BEGIN </font></p>
<p style="margin:0;"><font size="1">            &#8212; 3) Lets get all the Foreign Keys assosiated with this table </font></p>
<p style="margin:0;"><font size="1">            DECLARE @ForeignKeys TABLE (TableTempID bigint <br />               IDENTITY(1,1) PRIMARY KEY CLUSTERED, </font></p>
<p style="margin:0;"><font size="1">               [Name] varchar(2000),[OBJECT_ID] int, [is_disabled] bit, <br />               [is_not_for_replication] bit, <br />               [delete_referential_action] int, <br />               [update_referential_action] int, <br />               [Fk_table_name] varchar(2000), <br />               [Fk_table_schema] varchar(2000), <br />               [Pk_table_name] varchar(2000), <br />               [Pk_table_schema] varchar(2000), <br />               [Fk_col_name] varchar(2000), <br />               [Pk_col_name] varchar(2000), <br />               [constraint_column_id] int, <br />               [is_not_trusted] bit) </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            INSERT INTO @ForeignKeys <br />               ( [Name], [OBJECT_ID], [is_disabled], <br />                 [is_not_for_replication], [delete_referential_action], </font></p>
<p style="margin:0;"><font size="1">                 [update_referential_action], [Fk_table_name], <br />                 [Fk_table_schema], [Pk_table_name], [Pk_table_schema], </font></p>
<p style="margin:0;"><font size="1">                 [Fk_col_name], [Pk_col_name], [constraint_column_id], <br />                 [is_not_trusted] ) </font></p>
<p style="margin:0;"><font size="1">               ( select Fk.name, Fk.object_id, Fk.is_disabled,  <br />                  Fk.is_not_for_replication, Fk.delete_referential_action, </font></p>
<p style="margin:0;"><font size="1">                  Fk.update_referential_action, <br />                  object_name(Fk.parent_object_id) as Fk_table_name, </font></p>
<p style="margin:0;"><font size="1">                  schema_name(Fk.schema_id) as Fk_table_schema, <br />                  TbR.name as Pk_table_name, <br />                  schema_name(TbR.schema_id) Pk_table_schema, </font></p>
<p style="margin:0;"><font size="1">                  col_name(Fk.parent_object_id, <br />                  Fk_Cl.parent_column_id) as Fk_col_name, </font></p>
<p style="margin:0;"><font size="1">                  col_name(Fk.referenced_object_id, <br />                  Fk_Cl.referenced_column_id) as Pk_col_name, <br />                  Fk_Cl.constraint_column_id, </font></p>
<p style="margin:0;"><font size="1">                  Fk.is_not_trusted </font></p>
<p style="margin:0;"><font size="1">                 from sys.foreign_keys Fk <br />                  left outer join sys.tables TbR </font></p>
<p style="margin:0;"><font size="1">                 on TbR.object_id = Fk.referenced_object_id <br />                  inner join sys.foreign_key_columns Fk_Cl </font></p>
<p style="margin:0;"><font size="1">                 on Fk_Cl.constraint_object_id = Fk.object_id </font></p>
<p style="margin:0;"><font size="1">                 where </font></p>
<p style="margin:0;"><font size="1">                  ( ([TbR].[name] = &#8216;Table_1&#8242;) AND <br />                    (col_name(Fk.referenced_object_id,  <br />                        Fk_Cl.referenced_column_id) = &#8216;ID&#8217;) AND <br />                    ([Fk].[delete_referential_action] = 0) AND </font></p>
<p style="margin:0;"><font size="1">                    ([Fk].[is_disabled] = 0) AND <br />                    ([Fk].[is_not_trusted] = 0) ) ) </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">            &#8212; 4) Lets see how many Foreign Keys we are dealing with </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Counter bigint </font></p>
<p style="margin:0;"><font size="1">            DECLARE @MaxTableCount BIGINT </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            SELECT @MaxTableCount = max(TableTempID) from @ForeignKeys </font></p>
<p style="margin:0;"><font size="1">            SET @Counter = 1 </font></p>
<p style="margin:0;"><font size="1">            PRINT &#8216;  Found &#8216; + CONVERT(VARCHAR(255), @MaxTableCount) + <br />                 &#8216; foreign keys links for this table&#8217; </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Fk_table_name VARCHAR(2000) </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Pk_table_name VARCHAR(2000) </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Fk_col_name VARCHAR(2000) </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Pk_col_name VARCHAR(2000) </font></p>
<p style="margin:0;"><font size="1">            DECLARE @is_not_trusted BIT </font></p>
<p style="margin:0;"><font size="1">            DECLARE @is_disabled BIT </font></p>
<p style="margin:0;"><font size="1">            DECLARE @delete_referential_action INT </font></p>
<p style="margin:0;"><font size="1">            DECLARE @Fk_col_IsNullable BIT </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            DECLARE @sqlQuery nVarchar(4000) </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            &#8212; 5) Lets cycle through all the Foreign Keys </font></p>
<p style="margin:0;"><font size="1">            WHILE (@Counter &lt;= @MaxTableCount) </font></p>
<p style="margin:0;"><font size="1">            BEGIN </font></p>
<p style="margin:0;"><font size="1">                  </font></p>
<p style="margin:0;"><font size="1">                 SELECT @Fk_table_name = ltrim(rtrim(Fk_table_name)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @Pk_table_name = ltrim(rtrim(Pk_table_name)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @Fk_col_name = ltrim(rtrim(Fk_col_name)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @Pk_col_name = ltrim(rtrim(Pk_col_name)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @is_not_trusted = ltrim(rtrim(is_not_trusted)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @is_disabled = ltrim(rtrim(is_disabled)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                 SELECT @delete_referential_action = <br />                   ltrim(rtrim(delete_referential_action)) <br />                  FROM @ForeignKeys WHERE TableTempID = @Counter </font></p>
<p style="margin:0;"><font size="1">                  </font></p>
<p style="margin:0;"><font size="1">                 SELECT @Fk_col_IsNullable = c.IsNullable <br />                  FROM syscolumns c WHERE c.id = <br />                   OBJECT_ID(@Fk_table_name) AND <br />                   c.NAME = @Fk_col_name </font></p>
<p style="margin:0;"><font size="1">                  </font></p>
<p style="margin:0;"><font size="1">                  PRINT &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217; </font></p>
<p style="margin:0;"><font size="1">                  PRINT &#8216;  Processing key &#8216; + <br />                    CONVERT(VARCHAR(255), @Counter) + &#8216; of &#8216; + <br />                    CONVERT(VARCHAR(255), @MaxTableCount) </font></p>
<p style="margin:0;"><font size="1">                  PRINT &#8216;  @Fk_table_name &quot;&#8217; +  <br />                    CONVERT(VARCHAR(255), @Fk_table_name) + <br />                    &#8216;&quot; ~ @Fk_col_name &#8211; &quot;&#8217; + <br />                    CONVERT(VARCHAR(255), @Fk_col_name) + &#8216;&quot;&#8217; </font></p>
<p style="margin:0;"><font size="1">                  PRINT &#8221; </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">                  &#8212; 6) Lets verify that there is no CASCADE or <br />                  &#8211;    UPDATE already on the Key link and that <br />                  &#8211;    it is not a system table&#8230; also </font></p>
<p style="margin:0;"><font size="1">                  &#8211;    need to verify that the Foreign Key Table <br />                  &#8211;    is not the same as the current table and <br />                  &#8211;    that Key should be enforced. </font></p>
<p style="margin:0;"><font size="1">                  IF ( </font></p>
<p style="margin:0;"><font size="1">                              (@delete_referential_action = 0) AND </font></p>
<p style="margin:0;"><font size="1">                              (@is_not_trusted = 0) AND </font></p>
<p style="margin:0;"><font size="1">                              (@is_disabled = 0) AND </font></p>
<p style="margin:0;"><font size="1">                              (@Fk_table_name &lt;&gt; &#8216;dtproperties&#8217;) AND </font></p>
<p style="margin:0;"><font size="1">                              (@Fk_table_name &lt;&gt; &#8216;sysdiagrams&#8217;) AND </font></p>
<p style="margin:0;"><font size="1">                              (NOT (@Fk_table_name = @Pk_table_name)) </font></p>
<p style="margin:0;"><font size="1">                        ) </font></p>
<p style="margin:0;"><font size="1">                  BEGIN </font></p>
<p style="margin:0;"><font size="1">                  </font></p>
<p style="margin:0;"><font size="1">                        &#8212; 7) Because we need to execute deletes with <br />                        &#8211;    a &quot;EXECUTE sp_executesql&#8230;&quot; statement the </font></p>
<p style="margin:0;"><font size="1">                        &#8211;    DELETED table is not available so we must <br />                        &#8211;    cycle through it in case it is a batch <br />                        &#8211;    delete. </font></p>
<p style="margin:0;"><font size="1">                        &#8212; </font></p>
<p style="margin:0;"><font size="1">                        &#8211;    We convert the values to Varchar here to <br />                        &#8211;   account for PKs that are text and integer, <br />                        &#8211;   plus we need it as text later </font></p>
<p style="margin:0;"><font size="1">                        &#8212; </font></p>
<p style="margin:0;"><font size="1">                        &#8211;    This is because we do not know what all <br />                        &#8211;    the FK column names will be so we need </font></p>
<p style="margin:0;"><font size="1">                        &#8211;    to build the query </font></p>
<p style="margin:0;"><font size="1">                        DECLARE @DELETED_ROWS TABLE <br />                          (TableTempID bigint IDENTITY(1,1) <br />                            PRIMARY KEY CLUSTERED, </font></p>
<p style="margin:0;"><font size="1">                           [ValueINNER] varchar(4000)) </font></p>
<p style="margin:0;"><font size="1">                        </font></p>
<p style="margin:0;"><font size="1">                        INSERT INTO @DELETED_ROWS </font></p>
<p style="margin:0;"><font size="1">                          ( [ValueINNER] ) </font></p>
<p style="margin:0;"><font size="1">                          ( SELECT CONVERT(VARCHAR(4000), [ID]) <br />                            from DELETED ) </font></p>
<p style="margin:0;"><font size="1">                        DECLARE @CounterINNER bigint </font></p>
<p style="margin:0;"><font size="1">                        DECLARE @MaxTableCountINNER BIGINT </font></p>
<p style="margin:0;"><font size="1">                        DECLARE @ValueINNER VARCHAR(4000) </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">                        SELECT @MaxTableCountINNER = max(TableTempID) <br />                          from @DELETED_ROWS </font></p>
<p style="margin:0;"><font size="1">                        SET @CounterINNER = 1 </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">                        &#8212; 8) Lets cycle through all the ROWS to be deleted </font></p>
<p style="margin:0;"><font size="1">                        WHILE (@CounterINNER &lt;= @MaxTableCountINNER) </font></p>
<p style="margin:0;"><font size="1">                        BEGIN </font></p>
<p style="margin:0;"><font size="1">                              SELECT @ValueINNER = <br />                                 ltrim(rtrim([ValueINNER]))  <br />                              FROM @DELETED_ROWS WHERE <br />                                TableTempID = @CounterINNER </font></p>
<p style="margin:0;"><font size="1">                              &#8212; 9) Lets see if the Foreign Key <br />                              &#8211;    column allows nulls&#8230; we will <br />                              &#8211;    use this to guess if the linked <br />                              &#8211;    table is dependant on the <br />                              &#8211;    link (i.e. a link between </font></p>
<p style="margin:0;"><font size="1">                              &#8211;    an email and it&#8217;s attachments) <br />                              &#8211;    or if it is only a lookup link <br />                              &#8211;    (i.e. a link between a staff  <br />                              &#8211;    member and the email they edited&#8230; <br />                              &#8211;    may want to delete the staff <br />                              &#8211;    member but don&#8217;t want their <br />                              &#8211;    emails deleted) </font></p>
<p style="margin:0;"><font size="1">                              PRINT &#8216;====&#8217; </font></p>
<p style="margin:0;"><font size="1">                              IF (@Fk_col_IsNullable = 1) </font></p>
<p style="margin:0;"><font size="1">                              BEGIN </font></p>
<p style="margin:0;"><font size="1">                                    &#8212; 10a) Set LINKED values to NULL <br />                                    &#8211;      (Using the like statement here <br />                                    &#8211;      should account for INT and <br />                                    &#8211;      VARCHAR PKs) </font></p>
<p style="margin:0;"><font size="1">                                    PRINT &#8216;  UPDATE [' + @Fk_table_name <br />                                     + '] SET [' + @Fk_col_name  <br />                                     + '] = NULL WHERE [' + @Fk_col_name <br />                                     + '] LIKE &#8221;&#8217; + @ValueINNER + &#8221;&#8221; </font></p>
<p style="margin:0;"><font size="1">                                    SET @sqlQuery = &#8216; </font></p>
<p style="margin:0;"><font size="1">SET NOCOUNT OFF </font></p>
<p style="margin:0;"><font size="1">UPDATE [' + @Fk_table_name + '] SET [' + @Fk_col_name + '] = NULL WHERE [' + @Fk_col_name + '] LIKE &#8221;&#8217; + @ValueINNER + &#8221;&#8217; </font></p>
<p style="margin:0;"><font size="1">SET NOCOUNT ON&#8217; </font></p>
<p style="margin:0;"><font size="1">                                    &#8211;PRINT @sqlQuery </font></p>
<p style="margin:0;"><font size="1">                                    EXECUTE sp_executesql @sqlQuery </font></p>
<p style="margin:0;"><font size="1">                              END </font></p>
<p style="margin:0;"><font size="1">                              ELSE </font></p>
<p style="margin:0;"><font size="1">                              BEGIN </font></p>
<p style="margin:0;"><font size="1">                                    &#8212; 10b) Delete DEPENDANT values <br />                                    &#8211;      (Using the like statement <br />                                    &#8211;      here should account for INT <br />                                    &#8211;      and VARCHAR PKs) </font></p>
<p style="margin:0;"><font size="1">                                    PRINT &#8216;  DELETE FROM [' <br />                                     + @Fk_table_name + '] WHERE [' <br />                                     + @Fk_col_name + '] LIKE &#8221;&#8217; <br />                                     + @ValueINNER + &#8221;&#8221; </font></p>
<p style="margin:0;"><font size="1">                                    SET @sqlQuery = &#8216; </font></p>
<p style="margin:0;"><font size="1">SET NOCOUNT OFF </font></p>
<p style="margin:0;"><font size="1">DELETE FROM [' + @Fk_table_name + '] WHERE [' + @Fk_col_name + '] LIKE &#8221;&#8217; + @ValueINNER + &#8221;&#8217; </font></p>
<p style="margin:0;"><font size="1">SET NOCOUNT ON&#8217; </font></p>
<p style="margin:0;"><font size="1">                                    &#8211;PRINT @sqlQuery </font></p>
<p style="margin:0;"><font size="1">                                    EXECUTE sp_executesql @sqlQuery </font></p>
<p style="margin:0;"><font size="1">                              END </font></p>
<p style="margin:0;"><font size="1">                              PRINT &#8216;====&#8217; </font></p>
<p style="margin:0;"><font size="1">                              SET @CounterINNER = @CounterINNER + 1 </font></p>
<p style="margin:0;"><font size="1">                        END  </font></p>
<p style="margin:0;"><font size="1">                  END </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">                  SET @Counter = @Counter + 1 </font></p>
<p style="margin:0;"><font size="1">            END </font></p>
<p style="margin:0;"><font size="1">            PRINT &#8216;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8217; </font></p>
<p style="margin:0;"><font size="1">            </font></p>
<p style="margin:0;"><font size="1">            &#8212; 11) Proceed with the delete&#8230; </font></p>
<p style="margin:0;"><font size="1">            SET NOCOUNT OFF </font></p>
<p style="margin:0;"><font size="1">            DELETE FROM [Table_1] </font></p>
<p style="margin:0;"><font size="1">                  WHERE [ID] in (SELECT [ID] FROM DELETED) </font></p>
<p style="margin:0;"><font size="1">            SET NOCOUNT ON </font></p>
<p style="margin:0;"><font size="1">            &#8211;PRINT &#8216;DELETE FROM [Table_1] </font></p>
<p style="margin:0;"><font size="1">            &#8211;    WHERE [ID] in (SELECT [ID] FROM DELETED)&#8217; </font></p>
<p style="margin:0;"><font size="1">      END </font></p>
<p style="margin:0;"><font size="1">  </font></p>
<p style="margin:0;"><font size="1">      END  </font></p>
<p style="margin:0;"><font size="1">      </font></p>
<p style="margin:0;"><font size="1">      PRINT &#8216;COMPLETED &#8211; TRIG_PK_Table_1_Delete_FKs&#8217; </font></p>
<p style="margin:0;"><font size="1">      PRINT &#8216;***************************************************&#8217; </font></p>
<p style="margin:0;"><font size="1">      SET NOCOUNT OFF </font></p>
<p style="margin:0;"><font size="1">END </font></p>
<p style="margin:0;"><font size="1">GO <br /></font></p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
<p></span></p>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=3&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/01/23/t-sql-foreign-key-on-delete-cascade-and-on-delete-set-null-%e2%80%93-creating-an-alternative-instead-of-delete-trigger-that-allows-multiple-cascading-paths/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://developtheweb.files.wordpress.com/2009/01/96922d0abf276d68a8772f7fc464be72.jpg?w=300" medium="image" />

		<media:content url="http://developtheweb.files.wordpress.com/2009/01/0a5dae1dc60c3ad586017a9c5db72237.jpg?w=300" medium="image" />

		<media:content url="http://developtheweb.files.wordpress.com/2009/01/cf08a500553d9c3f4ecd11e15e7c569c.jpg?w=300" medium="image" />
	</item>
		<item>
		<title>1972 MGB GT &#8211; Part 3 &#8211; Fresh Air Vent, Cabin Heater &amp; Pipes, Water Jets, a Wiring problem found and Engine Test Run.</title>
		<link>http://developtheweb.wordpress.com/2009/01/10/1972-mgb-gt-part-3-fresh-air-vent-cabin-heater-pipes-water-jets-a-wiring-problem-found-and-engine-test-run/</link>
		<comments>http://developtheweb.wordpress.com/2009/01/10/1972-mgb-gt-part-3-fresh-air-vent-cabin-heater-pipes-water-jets-a-wiring-problem-found-and-engine-test-run/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 14:50:00 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Hobby - MGB GT]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/01/10/1972-mgb-gt-part-3-fresh-air-vent-cabin-heater-pipes-water-jets-a-wiring-problem-found-and-engine-test-run</guid>
		<description><![CDATA[Before starting work proper, on my project car, I wanted to test run the car for a bit to check the engine out after replacing most of the ignition system. Being winter, in Scotland, I wanted to check out a few things before I did this&#8230; First the water jets did not work; on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=6&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!447" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /></p>
<p>Before starting work proper, on my project car, I wanted to test run the car for a bit to check the engine out after replacing most of the ignition system. </p>
<p>Being winter, in Scotland, I wanted to check out a few things before I did this&#8230; </p>
<p>First the water jets did not work; on the heavily salted roads and driving into Glasgow, I would want them working. In addition the fresh air vent that is hidden behind the centre console was jammed open and there was no heat from the cabin heater to demist the windscreen. </p>
<p>During the journey, bring the car back from Heathrow, it was obvious from the smell that a connection in the manual water jets had came loose. No water would exit the jets but there was a distinct smell of screen wash from the centre console indicating that the manual pump was working, just not how it should. </p>
<p><a href="http://uuarra.bay.livefilestore.com/y1p8rQYdoMmSPjKmk5SkQt9IUTJMJTqyJjfkLodczuDV4CJngFu9RdJx_RdiyH7_UinwxbfU6qHRI6NSp_f5EpY5A?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1pZrWcHE8tfTvMSZShZvRvrZs4mh0_qdiydifPXA_sciXExvMS_oKQiowvLexOViFAbxYH3DH65K06W3jjR-qJvg?PARTNER=WRITER" align="left" border="0" /></a> <a href="http://uuarra.bay.livefilestore.com/y1pnX_zPtfc8Oqsp59fpKWQ7GEJi68IHa9cR8I--0Da4BYGGWKR5hD3tClgqiJtXon052x9UeIOpvkaYUJLkHkdHQ?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1pkoSaTW_TABX2rtlO4I5L5h-KU4k0wX8YMdQdR_ZVwyPwJQBdTxGJWOEbksrdGH-VLp6KaCozFBJpN1muf2gAtg?PARTNER=WRITER" align="right" border="0" /></a>I figured this would be a quick fix so one Wednesday night I removed the central air vents, which came out easy (and notably where not connected to their air pipes) and found that it was a simple disconnected connection. </p>
<p><a href="http://byfiles.storage.msn.com/y1p1Ed9UO2FHjrtYeZA4sC0oL1W-MPs8cvshZV5RkurcrtQocfpmF95NNNtb1goe2JYZSXa8sVWVpLNv5D2sk-pRg?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1p91mklT91YZlvVwNy2cf5nkqj9Dt1nCxmCBWZtzfPOgwSN2oBs3tQuB-jssoEfv3OFLL-2fIUlOpTZPa5cFRWtw?PARTNER=WRITER" align="left" border="0" /></a>From here I could also see that not only were the central vents disconnected, but the main window demist vents were also disconnected, on both ends! </p>
<p><a href="http://byfiles.storage.msn.com/y1pzgIgUUvSgZx0MvzSsiYKyiXFtXbKJP7ghrgnQFzXR9EaCc2xNPqWZ4K2wkp_JtqkfKlnWgPUNThY3LGkygtzwQ?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1pNevffzknAweI-akTrtq3nGOkpl6Bx3m6W1M2lBPSVvPZX5zirIW7Pcqh28CYZwaDlNKndfeZ1CZYJLHZiBZvqA?PARTNER=WRITER" align="right" border="0" /></a>Looking into the air pipes I also found the issue the jammed open fresh air vent (which can be seen in the background of the above picture, closed)&#8230; it was jammed open due to one of the windscreen demist pipes, having falling behind the leaver preventing it from closing. </p>
<p>While I fixed the air pipe connections I noticed a loose wire sparking off the stereo casing. Judging for the condition of the female bullet connectors condition, it looked like it was fairly old and must have been shorting there for some time! </p>
<p><a href="http://uuarra.bay.livefilestore.com/y1p5Ab4-M9pgPLlxGmhgkCK01uLCgr5RgM174X1QS9fqocNLZtHQb3Br0tcZIL_ZbVlJMC03aoXw6uSCNANwra2VQ?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1pp_jNaO5Gc3uFtXZfocx_YuQZXM24hq7iWVWngK-KTqjimFQtf7iErlvAVVSRZxYqWdmzqR8ItGHN82CZmjTK3A?PARTNER=WRITER" align="right" border="0" /></a> I removed the radio that had been fitted somepoint fairly recently&#8230; it has MP3 support, a USB connector and SD Card slot. I taped up the loose connection with <a href="http://uuarra.bay.livefilestore.com/y1p_fJi-WHrWvhNsVqn4qhKdQys6mRpQtCwDgk9cr_IyHj4-T6G4G0diPnQXuLedfQ8mdxjZpib-H4TJl_HT4Iaqg?PARTNER=WRITER" rel="WLPP"><img src="http://byfiles.storage.msn.com/y1pbU02CWNgT1fWWQJDk70aTHiO0RiQOBQ9LodAcdYOBjREBYRyeYaxOUC_cVAWNwv7BrIS19dhXzmEKsUGvhS_GA?PARTNER=WRITER" align="left" border="0" /></a>some insulating tape and will have to investigate further where exactly it should be connected to when I dismantle that area during the rebuild process. </p>
<p><a href="http://uuarra.bay.livefilestore.com/y1p5Ab4-M9pgPLlxGmhgkCK01uLCgr5RgM174X1QS9fqocNLZtHQb3Br0tcZIL_ZbVlJMC03aoXw6uSCNANwra2VQ?PARTNER=WRITER"></a>While re-inserting the radio, due to the mess of the wiring behind it I inadvertently disconnected clock and cigarette lighter. </p>
<p>Once reconnected I found I was getting heat to the demist vents, and now the fan switch did not have the water jets squirting onto it, the fan worked (well most of the time, switch seems faulty)&#8230; the heater would only give heat to the windscreen and would not fully switch to the centre console vents that continued to release cold air through the driver side, though this would be more than fine for a few test drives.   </p>
<p>So I had water jets and de-mist ability&#8230; this would allow me to take the car for a few test runs&#8230; </p>
<p>The next morning I used the car for the school run taking Caelan to nursery. </p>
<p>This went fine, with the car starting each time first turnover, so I decided it should be fine to take into a work meeting in Glasgow on Friday. This would be a round trip journey of close to 100 miles and provides the opportunity to the use the motorway there and to use some B roads for 3/4 of the return journey. </p>
<p>The journey into and out of Glasgow went without a hitch! So all going well so far. </p>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=6&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/01/10/1972-mgb-gt-part-3-fresh-air-vent-cabin-heater-pipes-water-jets-a-wiring-problem-found-and-engine-test-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pZrWcHE8tfTvMSZShZvRvrZs4mh0_qdiydifPXA_sciXExvMS_oKQiowvLexOViFAbxYH3DH65K06W3jjR-qJvg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pkoSaTW_TABX2rtlO4I5L5h-KU4k0wX8YMdQdR_ZVwyPwJQBdTxGJWOEbksrdGH-VLp6KaCozFBJpN1muf2gAtg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p91mklT91YZlvVwNy2cf5nkqj9Dt1nCxmCBWZtzfPOgwSN2oBs3tQuB-jssoEfv3OFLL-2fIUlOpTZPa5cFRWtw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pNevffzknAweI-akTrtq3nGOkpl6Bx3m6W1M2lBPSVvPZX5zirIW7Pcqh28CYZwaDlNKndfeZ1CZYJLHZiBZvqA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pp_jNaO5Gc3uFtXZfocx_YuQZXM24hq7iWVWngK-KTqjimFQtf7iErlvAVVSRZxYqWdmzqR8ItGHN82CZmjTK3A?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pbU02CWNgT1fWWQJDk70aTHiO0RiQOBQ9LodAcdYOBjREBYRyeYaxOUC_cVAWNwv7BrIS19dhXzmEKsUGvhS_GA?PARTNER=WRITER" medium="image" />
	</item>
		<item>
		<title>1972 MGB GT &#8211; Part 2 &#8211; Lights, Ignition System and Misfire</title>
		<link>http://developtheweb.wordpress.com/2009/01/07/1972-mgb-gt-part-2-lights-ignition-system-and-misfire/</link>
		<comments>http://developtheweb.wordpress.com/2009/01/07/1972-mgb-gt-part-2-lights-ignition-system-and-misfire/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 19:04:05 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Hobby - MGB GT]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/01/07/1972-mgb-gt-part-2-lights-ignition-system-and-misfire</guid>
		<description><![CDATA[As mentioned in my previous post, on the journey back from Heathrow, the car had a slight misfire which was more noticeable the next day. The MGB GT has a twin carburetor, where one carburetor feeds the first two cylinders and the other the second two. As the air filters looked quite old and the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=5&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!434" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /></p>
<p>As mentioned in my previous post, on the journey back from Heathrow, the car had a slight misfire which was more noticeable the next day. </p>
<p><a href="http://g1fczg.bay.livefilestore.com/y1pgIbs92rF6zaQ1fygfu2BBBKDxWgl4YcHraiI_M0voBADvPVCaegdazcq0jt7I3esWrW83HQFQUbAEqBSGZZrFw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pzC2GL9pJ9mWStxWczIoojE99oO9cBA-_NkOopmnAOepoHqr316kKVGMZUC0qTEffAmBnMwK-e2CewFGZNRFkYw?PARTNER=WRITER" align="right" border="0" /></a> The MGB GT has a twin carburetor, where one carburetor feeds the first two cylinders and the other the second two. As the air filters looked quite old and the misfire sounded like it was on a couple of cylinders I thought I would check them first. </p>
<p>As it turned out the rubber seals around the inside of the K&amp;N filters had completely split, partially blocking the air filters. </p>
<p><a href="http://g1fczg.bay.livefilestore.com/y1pQeaBMp0ELrMLyQspxTsFS2HVLviIosbMda_x5Rz3AzdVQ7S96FO5vGJsgH_V8ecNLNKlFo-jCwnhM5CZrQQ-Ng?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pWI5JiLAzdbb8PNahOrNFzxsEIrw_lRFiuyzZ-PVngDvkoA_tPvkN19yLVkzELuktIvBtv9e9SryXsvEWZJpO9A?PARTNER=WRITER" align="right" border="0" /></a> Before going down to pick up the car I had ordered a service kit from the MG Owners Club, as the previous owner had told me it would be due one soon. The service kit came with two standard air filters. Though they are designed to go in the standard air filter housing I briefly replaced the K&amp;N filters with the new standard filters to see if it would make any difference. I also gave the carburetors a quick visual check and oiled the accelerator connections. </p>
<p>Replacing the filters did not correct the problem so I proceeded to check the ignition system. </p>
<p>As it turned out there was several problems, the points were corroded, the distributor cap had worn points and corroded lead connector points, the ignition leads were corroded and damaged, and the spark plugs looked like they could do with being replaced. </p>
<p align="center"><a href="http://g1fczg.bay.livefilestore.com/y1pXLY6mVYtndkygtbw3IWuvm0Nktdt53-wI_OCGcqK5-19YYEEppJQbalswkTSnbLWCkm-1_zNYCXSBXcYoPf0bQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pslswsJjVX0E-vSy7A74GHVFMyiYj4_Gkhl_N6Fd4r2MjBaD4WK9vEPs-KpP7oQiPeoXlK-OFPySzwz_MD74yhw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pvhIIdalTWcNtK88Vqaqj1_0ICMuyez-S_-2ju7xUKgsyzTMu8IAkJIip_pJ4UwWQbhUt5xYkupsUQ9lj6OaWMg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p1xqClb5QAnKOqzxsY0jxQBel-DJPsOiDIZFjkhHLCVaGqGgh3T0GDLoLoa-bA7sCeh__wPJcod8SOsZaDOfCbQ?PARTNER=WRITER" border="0" /></a> <a href="http://byfiles.storage.msn.com/y1pDFEkVy0xcgLJaplPiY-o6mXl1Dybq9faOlTtl2lAfWGHRq6xYFwi6hSKpqUEn73D-hvwGxfqAoSOOHGlH2u0qA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pfxx9va-gR8O0qjcosAnPNYz2Qq7dKrv81qyuuD5FY-T5F1mTpUCgyxPeIzg1ZZ6vIktGcuGusmsKE5qAsYScyQ?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pY1743ZW151iPTVx9LNESspGayhEEv3T7H6c1-7iqO0morBtzL9w0nbR8dHTiLHxS3noXQzQevTDPJwKzJ12-gw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pZwAqhZWOE-4Qd6S6hJSTHWT7JX648OfFLTO8dwdxnJcKWRLiMblExLjvZmiVEJ-nLIetiq6kY7EBYSkY5KTVqQ?PARTNER=WRITER" border="0" /></a> <br /><a href="http://g1fczg.bay.livefilestore.com/y1pscyXuZTZ3eRt79tZFFu1LBdyjODA_YfFpxROOZVUNqco-cYVA3sNhmCEGfFCFb91F4SOhNkcXZPXqB_RrbdPNA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pV__jGhUKdZpYOyF8fbMGS98rg9-TVmPiv8Cyp_4D6eMH_UurqxiOwVHcfQaO2WAs0NGpmkki3YRkJK81zFWFIw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pDvK_KIUfuxoM9xFMCRWljH7MFLOWo1rKqLfdrZxbcUD0lCrjellzw-Ze3S7oFYCvgcry4ifQj89P2epBAipT8A?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pkWh8pOzPCSR5NjbPL36-f6fGJDD762b0eFNkSnuFEIR-6mUDAgIuF16SriF0J6nHc4DX8y9NtYb166qlmjvr-Q?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1p24tHbJEW4MimDYUC0LgdobTVpHcYNV79jh4Nzk8YYtH8m9G7bDlkA4PRAVAo3VI7KKNs7YZB_dliWClnMARKIA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pXYPnQy5_2dxOxgjUZ6XDP7TsV2ryjgrvZsrscaRLIg38fI5-4QXegxBWU1QZQfSLAVbqiSS1GUuAUFSTje1a-Q?PARTNER=WRITER" border="0" /></a> </p>
<p>As the service kit I bought came with a new condenser, points and spark plugs, I fitted these first and ordered new ignition leads, distributor cap, rotor arm, ignition coil and air filters. </p>
<hr />
<p><p><a href="http://g1fczg.bay.livefilestore.com/y1pMN027Qm7Ig88N-gPVxGQF2Vl-2sHPwRLaG5Tu-y2WZ-9LkyuyMdKaEF7N8vl6FyU4loHFUviTMC-iR-w1bEUvg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pl7eQLwz_p8_0cZlSy9S3LWVq9EtC3BACnkxA5bVjr4kD3uhBe-CwbNcgTs7mvSuJRdjUB5cu6XyoXmWYvLdG3g?PARTNER=WRITER" align="right" border="0" /></a> In addition to the misfire, when bringing  the car back up to Scotland, the window wipers had stopped working around half way back. Checking the handbook I quickly found which fuse had blown. The same fuse is used for the heater blower, which appears to be the problem. </p>
<p><a href="http://g1fczg.bay.livefilestore.com/y1pBj89SxfyxU86DNxXGNaPMV50y4kBZ-R4tG9QL_La28OD5XVanncqfx2f0dZ5gpvP91Yy4R1_yrrezQBUA5r-Aw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pUF6WhVFksUgp5N0wtNM0ikCVUuupP9LcCf2Ul1Nr3tn7Uf85s4li668WofSAtR1k5d5S3YHD_gvp5kZmbxEb1Q?PARTNER=WRITER" align="left" border="0" /></a>As there was no spare fuses in the fuse box I had to repeatedly stop on the way back to clear the screen. As the fuses used in the MGB&#8217;s are no-longer available at any service stations I also order some some from the MG Owners Club (<a href="http://www.mgocspares.co.uk/">http://www.mgocspares.co.uk/</a>). </p>
<hr />
<p><p>While picking up the car the previous owner also noticed that one of the side lights had stopped working during their journey to the Airport. While checking this I also gave the car a quick check over to see if anything else was in need of immediate replacement prior to starting on the bodywork. </p>
<p>While checking the lights I found that the housing for the driver side headlamp was severely corroded, and some of the wires (namely the side light ones), had came away from their terminal connectors. </p>
<p align="center"><a href="http://g1fczg.bay.livefilestore.com/y1p-C5WDjx_a1F-z7tcj2JHHHfyPGTNPVozcKEhEdOySp_kBdlO9B8e-ixTz9Jo2latJFaTA1u7T6nzt_vxHb2qHg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pumSvskC-hQKuJSL6A5Fq7pd9D1Ea-9uZrtWnvdB3BR4Uwihem4mfpXy8JHpyn664GJcOvvz8s2owbe2qPK7XOA?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pRoQzKDEewwCm7pnSt7AGSyTFiRKN_jDXfFkf7bRVWkHK7acOWTzI-5dpWkXTYenR3r68rdts74YcnlwoJlYR9g?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pSj6qO6LYfx8mcLFkqSkEQRyVDptMl_2BWT4y8uv2nQyIhe4TshXBRJXdR9nqAvq241nPERVq7Y_5vOsqx0s8jw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1p95u_-4GbC9JbhuInTp7gf0Tthq_CpkqshfTcfQKFla43NXPFl5Ma2Eu57jdCfcgsxshvuLnvXA7O0oCUTOtdOg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pnRRIWc9QaBj4tu7fCAGYcfGsdfV2z9rLLeYgxyF3o0J4AJEpcSuN_GBp65dVQApqPN6UMwlwiGB-1F9rOtjOqA?PARTNER=WRITER" border="0" /></a> <br /><a href="http://g1fczg.bay.livefilestore.com/y1pyVcJkpJVSytx9gztAnAmOTVmO10sjlEKK8A6Mf7b8zTarv03ZAB2VA2-bzRYij85wYuA3pu-A4e5XlAh427o0A?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pWeb1Xcp-h4WTr09ZKGr2yLnNl4pC4VW0W12TdSl2uf8DlXvO4dtygNcYisVounQBYRI87DiQv6t1eUnxcEoZ-Q?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pQDZt4T1X3xqoJjDCA6oVARwUngMpvaBJ4LaozvwAomnJBymGiHKR1XJ2fU07WpN31rSUoQdAabMcMT214bYw0w?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pZOyjDFyg3_pUUlmNvGlYQ3qP_bqC10sDWKQieAOfNP6_jDqCBApsAHEmv3XHwSeXVzVjCkxff0qNgUYTDh_ouw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pX9DMiq1qNvKc16z01dW5S4lqeX32jrlLRNbNRbN3g8k2GJswbXygRmhUUBdOFrkj4tY5us6smhVfxGnvQ7HcMQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pKlokJEl7_KDFPQtL6oiU69JTJqcQ17AazuZC7pcedOjGIi5dJTra4BCdselWOY9xyrjfEYxk9CF1HsXMi4EewA?PARTNER=WRITER" border="0" /></a> </p>
<p>I added the headlamp housing and rubber seal to the list of parts I needed just now. </p>
<hr />
<p><p>The delivery of the spares was very prompt, allowing me to replace the parts over the next few weekends, taking a few weekends off to visit relatives over Christmas and getting the car running again last weekend. </p>
<p align="center"><a href="http://g1fczg.bay.livefilestore.com/y1p3rICN18qqNQCayMTUDs9Z4Ju55Iep_qL19dxdCHA2R4W4C4n0E62MnxbaAi9zB6eXfAqASP8Ri9Noe5SXnis3Q?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pOrAMqrvHXohsHglguj19b3F8XjHOO7_WI3Zo1dXvyK_V4YKWB6An1JaaXJ-05FYR0uQtw3e5kTW151K9l_Pvlw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pqnu-lf9z2sKHvRIYW9m-LG8PB8fuaxWghH6LcFN0RKiyBWD8hRiZ1wgdZKDdnuSmmh_a30Y6DD4F_ja2z8zleg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pGqpTnb_sUIS7BWveA0X-fO-4teo3011BlHFuvhZDc6wU54NMH58yvgazQJxJwO3NjKoMF4r-efhQUmmmVdDMLQ?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1p_1rrlxFvuUdTfZ5kCjQDgLmkM02HtFpJA1ItqpFLgfiGQ_O2auyXWlL9KEpJiuCpNfGMK6dFds16otDhx2hZIg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pWqeBAxy2fVcy9cpk7GrzfR6-lrQZDnDOnyftZgTq8fTA0I8fEEHOUgERSdu_wIhhZkj3xakR51sp0CuNcvUlyQ?PARTNER=WRITER" border="0" /></a> <br /><a href="http://g1fczg.bay.livefilestore.com/y1pPdpH99pZr0zhrlhDAZCH17SAR2WJ4TZlhxlBjjtxcTOlJ7HlLoogEfEq0C0bMTZ1PWXmf2G6PDAdzKHDkwNdSw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pai4rsSx1BXoCktUjW09TC0GsCi2YmbchTPGzUUueFs0GAMlIzZ2NKgi_4P25yFI2n5Po1qjb3LsKdJGJYUfIzA?PARTNER=WRITER" border="0" /></a> <a href="http://byfiles.storage.msn.com/y1pfJNK_Cj9-i1CIh3uxWs0iyIN0o5CBN9T3je24dhCxvwmD3b7Fms2iOnaEFcWKxBCjjf5HrMq3OneSkFpCMZRRA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p9KIQLdxlFkpd64W2BNYhdCCvDw-BoXpnv1GFkfeyj8Zbl7JKW7UwyUUdFTDBg6_3UAQ8eyKsNLOhBCdIpNZJVw?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1pgaOMeoI-5pPbEp5HfNq0hC1IEYKtL2MgOQ1l5pyR7gAMsdC7n14fe_sMnC8UvozQkXDzj-SWSVrt-AwqaQ9OuQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p_gJEQyMOJYIbGiDWW4WEAH_obpmYEPNaE1HJKbJVawbKVKowg2qyI0hh4XFWtHGjFnisOpmjj26PB14ZD-KYow?PARTNER=WRITER" border="0" /></a> <br /><a href="http://g1fczg.bay.livefilestore.com/y1pdzM6dGseVAqHD8UkhIsyo2BLJSZCg75aYpLEkIdApz0v0QOonccnHnbf48i6L5cWNt9bETnGw04zXQgG9baRgA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pCUNzUqPWNB7lbbMX7ZiU-cGWFsfPjcc3pqDeF8f5hEuJGvpfChtcHNy0K2o1zAzn5AD7K3JVRnCSGDu4UpxMZA?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1p9j52Lpb5rPLG9RbMCVDqF_sVVZ7jsmnGpk0MuRpV8DpMIr-K3V9z2iNSvmGk0fq8ll2rklzSsYcKcXPE_Ja-2w?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pmL9kgjtt52mOwK2K1Ik7nfPnr01jycchHO2AZ0P3bL28AvkdBPpR3EyiV99zTg9p4KQXKrC_ncDmXrxHlZBQfg?PARTNER=WRITER" border="0" /></a> <a href="http://g1fczg.bay.livefilestore.com/y1p5sQX4dw8U_8KlD72dNkOKNRMiVt7cmiUPAab7OQhhkeuDg3NZQYkXQTUGpA5XqupfhN_o27p4_JF5GXXLOM4YA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pj7fFMZZ2KKsuWqPVbVHTES2w39SYdGaT52eJuFsQqwu4d2HMlaS2lrLAxEn_mqY68Y8aGt4A8KkYXvjsnbD0sA?PARTNER=WRITER" border="0" /></a> </p>
<p>Having replaced all but the ignition coil and distributor itself, the engine appears to be running smoothly now, though I have only ran it for 5 to 10 miles so far, I intend run it a bit more before starting to strip out more major parts for inspection, and possible replacement. </p>
<hr />
<p><p>Some of the things that are on my list to tackle next include: &#8211; </p>
<ul>
<li>One of the jack points needs re-welded (will also get a mechanic to check and see if any other welding is required)
<li>Some areas need to be retreated with under-seal
<li>Driver side sill, to the rear, needs repaired
<li>The major job&#8230; the various areas of bodywork that need attention and a re-spray
<li>General engine bay tidy up (some water trap areas need touching up and repairing)
<li>Source problem with de-mist pipes and manual water jets
<li>Locate where cold air is entering the foot-well (cool air vent was shut)
<li>Look into the heater and all associated piping (air and water), see what needs replaced and what is OK
<li>Fitting electric water jets (still fitted with the old manual jets)
<li>Window seals (front quarter windows in particular) need attention
<li>Oil change and replace oil filter
<li>Check header gasket and possibly replace
<li>Re-oil SU carburetors
<li>Replace timing belt (as I have no idea when it was last done) 
<p>          &#8230; no doubt more will be added to the list as the project unfolds &#8230; </li>
</li>
</li>
</li>
</li>
</li>
</ul>
<p>For it&#8217;s age and the money I parted with, I am quite pleased with the condition of the car so far&#8230; particularly given the previous owner had told me that the owner, prior to them, had left it sitting outdoors unused for many years (to the point it was moss covered), before they rescued it. They gave it a little clean up and continued using it for a couple of years as a general run around until they had to sell to it to make way for a VW Camper they were purchasing.</p>
</p>
</p>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=5&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/01/07/1972-mgb-gt-part-2-lights-ignition-system-and-misfire/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pzC2GL9pJ9mWStxWczIoojE99oO9cBA-_NkOopmnAOepoHqr316kKVGMZUC0qTEffAmBnMwK-e2CewFGZNRFkYw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pWI5JiLAzdbb8PNahOrNFzxsEIrw_lRFiuyzZ-PVngDvkoA_tPvkN19yLVkzELuktIvBtv9e9SryXsvEWZJpO9A?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pslswsJjVX0E-vSy7A74GHVFMyiYj4_Gkhl_N6Fd4r2MjBaD4WK9vEPs-KpP7oQiPeoXlK-OFPySzwz_MD74yhw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p1xqClb5QAnKOqzxsY0jxQBel-DJPsOiDIZFjkhHLCVaGqGgh3T0GDLoLoa-bA7sCeh__wPJcod8SOsZaDOfCbQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pfxx9va-gR8O0qjcosAnPNYz2Qq7dKrv81qyuuD5FY-T5F1mTpUCgyxPeIzg1ZZ6vIktGcuGusmsKE5qAsYScyQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pZwAqhZWOE-4Qd6S6hJSTHWT7JX648OfFLTO8dwdxnJcKWRLiMblExLjvZmiVEJ-nLIetiq6kY7EBYSkY5KTVqQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pV__jGhUKdZpYOyF8fbMGS98rg9-TVmPiv8Cyp_4D6eMH_UurqxiOwVHcfQaO2WAs0NGpmkki3YRkJK81zFWFIw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pkWh8pOzPCSR5NjbPL36-f6fGJDD762b0eFNkSnuFEIR-6mUDAgIuF16SriF0J6nHc4DX8y9NtYb166qlmjvr-Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pXYPnQy5_2dxOxgjUZ6XDP7TsV2ryjgrvZsrscaRLIg38fI5-4QXegxBWU1QZQfSLAVbqiSS1GUuAUFSTje1a-Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pl7eQLwz_p8_0cZlSy9S3LWVq9EtC3BACnkxA5bVjr4kD3uhBe-CwbNcgTs7mvSuJRdjUB5cu6XyoXmWYvLdG3g?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pUF6WhVFksUgp5N0wtNM0ikCVUuupP9LcCf2Ul1Nr3tn7Uf85s4li668WofSAtR1k5d5S3YHD_gvp5kZmbxEb1Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pumSvskC-hQKuJSL6A5Fq7pd9D1Ea-9uZrtWnvdB3BR4Uwihem4mfpXy8JHpyn664GJcOvvz8s2owbe2qPK7XOA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pSj6qO6LYfx8mcLFkqSkEQRyVDptMl_2BWT4y8uv2nQyIhe4TshXBRJXdR9nqAvq241nPERVq7Y_5vOsqx0s8jw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pnRRIWc9QaBj4tu7fCAGYcfGsdfV2z9rLLeYgxyF3o0J4AJEpcSuN_GBp65dVQApqPN6UMwlwiGB-1F9rOtjOqA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pWeb1Xcp-h4WTr09ZKGr2yLnNl4pC4VW0W12TdSl2uf8DlXvO4dtygNcYisVounQBYRI87DiQv6t1eUnxcEoZ-Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pZOyjDFyg3_pUUlmNvGlYQ3qP_bqC10sDWKQieAOfNP6_jDqCBApsAHEmv3XHwSeXVzVjCkxff0qNgUYTDh_ouw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pKlokJEl7_KDFPQtL6oiU69JTJqcQ17AazuZC7pcedOjGIi5dJTra4BCdselWOY9xyrjfEYxk9CF1HsXMi4EewA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pOrAMqrvHXohsHglguj19b3F8XjHOO7_WI3Zo1dXvyK_V4YKWB6An1JaaXJ-05FYR0uQtw3e5kTW151K9l_Pvlw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pGqpTnb_sUIS7BWveA0X-fO-4teo3011BlHFuvhZDc6wU54NMH58yvgazQJxJwO3NjKoMF4r-efhQUmmmVdDMLQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pWqeBAxy2fVcy9cpk7GrzfR6-lrQZDnDOnyftZgTq8fTA0I8fEEHOUgERSdu_wIhhZkj3xakR51sp0CuNcvUlyQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pai4rsSx1BXoCktUjW09TC0GsCi2YmbchTPGzUUueFs0GAMlIzZ2NKgi_4P25yFI2n5Po1qjb3LsKdJGJYUfIzA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p9KIQLdxlFkpd64W2BNYhdCCvDw-BoXpnv1GFkfeyj8Zbl7JKW7UwyUUdFTDBg6_3UAQ8eyKsNLOhBCdIpNZJVw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p_gJEQyMOJYIbGiDWW4WEAH_obpmYEPNaE1HJKbJVawbKVKowg2qyI0hh4XFWtHGjFnisOpmjj26PB14ZD-KYow?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pCUNzUqPWNB7lbbMX7ZiU-cGWFsfPjcc3pqDeF8f5hEuJGvpfChtcHNy0K2o1zAzn5AD7K3JVRnCSGDu4UpxMZA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pmL9kgjtt52mOwK2K1Ik7nfPnr01jycchHO2AZ0P3bL28AvkdBPpR3EyiV99zTg9p4KQXKrC_ncDmXrxHlZBQfg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pj7fFMZZ2KKsuWqPVbVHTES2w39SYdGaT52eJuFsQqwu4d2HMlaS2lrLAxEn_mqY68Y8aGt4A8KkYXvjsnbD0sA?PARTNER=WRITER" medium="image" />
	</item>
		<item>
		<title>1972 MGB GT &#8211; Part 1 &#8211; A project to keep my sanity!</title>
		<link>http://developtheweb.wordpress.com/2009/01/06/1972-mgb-gt-part-1-a-project-to-keep-my-sanity/</link>
		<comments>http://developtheweb.wordpress.com/2009/01/06/1972-mgb-gt-part-1-a-project-to-keep-my-sanity/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:30:33 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Hobby - MGB GT]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/01/06/1972-mgb-gt-part-1-a-project-to-keep-my-sanity</guid>
		<description><![CDATA[I had originally intended on keeping a separate blog or web-site to log my progress on this project, but have decided to just expand this blog, rather than manage yet another site. In late October 2008 my dad informed me that he would be giving me, my brothers and my sister a little of his [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=4&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!335" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /></p>
<p>I had originally intended on keeping a separate blog or web-site to log my progress on this project, but have decided to just expand this blog, rather than manage yet another site. </p>
<p><a href="http://g1fezg.bay.livefilestore.com/y1pm7FeeSqu9xuW0HULiNEJ5RdQXFu8jQYn9XkbcBfeGvLFjWnfz93p6kyfH9BxmJKi2KNq9_r3VALUTJx8iqvuoA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pTdgcq0zbQMScoi7AbAbcIEBuigAzolyj5-hzVOPMRNAMRxMindSRgbXE7MCkQKERXsVWvNcE2lvcOY5zvnjKUg?PARTNER=WRITER" align="right" border="0" /></a>In late October 2008 my dad informed me that he would be giving me, my brothers and my sister a little of his share of his inheritance. My dad, his brothers and sisters had split some inheritance that Granny had left after she had passed. She passed away earlier in 2008 after suffering for several years from Cancer. True to her nature and not wanting people to fuss, she had kept her suffering a secret almost to the end, just getting on with life and only telling the family when she started to get too ill. </p>
<p>Though it was not a lot of money I did not want to waste it on bills or similar&#8230; So I decided it was about time to renew an old hobby, classic cars&#8230; and possibly introduce my kids to some dirt and oil. </p>
<p>For many years now my main hobby has been has been my job and vice versa (software development and computer programming)&#8230; hobby since 1990 job since 1997, with any spare time between the two being taken up by the kids, parenthood and the occasional computer game or xbox distraction. </p>
<p>In order to keep the old brain fresh for coding I figure it is time to get my fingernails dirty again. </p>
<hr />
<p><p>Prior to spending most of my time in front of a computer screen I used to spend a reasonable amount under a bonnet or re-wiring my old bangers. Admittedly most of the time it was out of necessity, rather than desire&#8230; spending most of my money on books, computer hardware, OU courses and the kids meant that all of my earlier cars were bangers run on a shoe string. Saying that there was always a lot of satisfaction in doing the repairs and maintenance myself or with the help of my dad&#8230; </p>
<p>First car I bought was a 1973 Opel Ascona, purchased for the pricey sum of £200, this was before owning a classic became more fashionable and the prices went up quite a bit. </p>
<p>Though it required a fair upkeep during it&#8217;s life, it went on for a surprising number of years passing between myself and my father a couple of times&#8230; There was then the 1988 Ford Sierra Estate, actually this is the car I learned to drive in before getting the Opel when I passed my test, I swapped the Opel with my Dad for this and took on the repayments for a while. Then there was a 1973 Volkswagen Beetle (that needed completely rewired, having melted all the wiring and somehow just got a MOT&#8230; always checked the electrics on a car I bought after this one and never trusted a MOT), then a Fiat 126 (my dad bought this but I used it for a while) and a 1982 Ford Capri. </p>
<p align="center"><a href="http://byfiles.storage.msn.com/y1pALXo5EXwuKnrWyuVel6usD9I7VJMF-W0jRry5kBIz6O6lLZBXU-Jvns1ay98i8UBjQdtRDWNGqiXrioNHi2haA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pDDKuHiIqnVtd-pACo5Q8Iroc4PMtVnQ1-pX2Ri5WO8NY36UMpEht-eLEoPPTaoUr3lDPb4Qli9s-lHQd55Iumg?PARTNER=WRITER" border="0" /></a><a href="http://byfiles.storage.msn.com/y1pA6RHG-PJa-lroQaTnpNqBdmG_IoxhBtjN4m0jrVPuGz5Kaq6rtZcrhq0IxblaZ6ZylAqDgpCyCk2rsvbBd5hHg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pgM0JnT7wFeCXNw12MFYCyqX-vykP_Iot8brEfHg7lPOcaBjVputuMX1gZXkt7VyAscEpKfcddalrR5Tq1sv_EQ?PARTNER=WRITER" border="0" /></a><a href="http://byfiles.storage.msn.com/y1prfZ0d9KXU7QNqcBQQL_jZ3yc58JctAOu1__3v8y5H64N_ykfBiQbyylanOB5md0KfmuAbPs9Ho39PFBuxp4amw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p4ZYRJgvpq-bAQM8a4MPLAjMnSB1gFuScJnxRLZtRnpOugQ3bAiAVPzrnEZrZ3LteGIfFfmcjWJFnITuFotxO0Q?PARTNER=WRITER" border="0" /></a>  <br /><a href="http://byfiles.storage.msn.com/y1pZle-FsrDACnO4jNT1Y138I67D5RGxUttebUqf5cul6iHn_uR-Omj7Xm4JFQjNRXmV8r3l5BvEL8g8rI1JyVHUA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p0vqar1rcxpNzZlGCFHL4tVJi2qSrWkOzKCaz7QWOCdT8p5gnHOuqKCWrjbMfq7SwGH6bSWQD96e-ZyZe3YIOzw?PARTNER=WRITER" border="0" /></a><a href="http://g1fezg.bay.livefilestore.com/y1pwP63uYbKTZNDBt5leKe1MemHM3lZjpw3LaMiIitFMMXuE7Ig6Uu3lkRRE3MZ5EOShVSE93ZHlQpVnbM1xw_LoA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p8u__aQ1FlfBYT8q0Uo30SnI-xfkD0welBYHUgMUS5m2JuNWJuQ44weOU-pfZVe-DcdgqC-_c_RH0qSMZw9iVXw?PARTNER=WRITER" border="0" /></a> </p>
<p align="left">I then moved onto more modern cars working my way through a Rover Mini Metro, a Ford Focus, a Citroen Picasso, a Volvo 940 Turbo, a Ford Mondeo and currently a Chrysler Voyager. </p>
<p align="left">And that&#8217;s just the cars I have been through (my dad&#8217;s list is much longer and more impressive, including a bubble car, Ford Cortina, various customs, a Ford Anglia and many more). </p>
<hr />
<p><p>So&#8230; I had a few pennies from my Granny and decided to get an old classic in need of some repairs as a way to entertain myself on weekends in my garage. I had always wanted to repair and restore an old classic rather than just keep it running out of necessity. </p>
<p>Having researched various types of classic cars I decided that I would go for an MGB GT. There was several reasons for this&#8230; </p>
<p>Firstly I had always wanted one when I was younger but they had always been out-with my budget and once I could have afforded one, well one word&#8230; &quot;kids&quot;, so not really practical. Though the money I was getting would not normally be enough for a MGB GT; with the economic climate looking bleaker and bleaker it seemed it would be a buyers market for second-hand cars, bringing prices much closer to my budget. </p>
<p>Other factors came into play as well, such as the great availability of reasonably priced replacement parts for the MGB GT, through the various owners clubs&#8230; it was after all one of the most popular British small sports cars built. There is also an abundance of books and other materials on them. </p>
<p>Having settled on the idea and to my surprise getting instant approval from my wife, I set about trying to find one. It soon became obvious that the best place to get a good deal would be on eBay, buying a car through eBay is something I never thought I would do, but prices elsewhere still seemed high. </p>
<p>I was ideally looking for something 1972 or earlier (something that would be road tax exempt here in the UK, so I don&#8217;t have to worry about the yearly cost as much). It had to be something needing some work, but was currently running and have a MOT so that I could get it home. </p>
<p>Having browsed and monitored auctions for several weeks, it was looking like I would only be able to get something post 1973 for the money I had available. So I bid on a couple of cars from 1973. Though I was the highest bidder on both they never reached their reserve and the sellers were expecting more than double what the auctions reached and more than I was willing to pay. </p>
<p>I was in no rush and wasn&#8217;t about to be convinced to part with more money than I had budgeted. </p>
<p><a href="http://g1fezg.bay.livefilestore.com/y1pp7ZfHTCGpkyjfa9jx7OXr2nmwCb1BkJJ_xQ2pYrOB3r7GJvk5OImb5nVYsLKXewCi4sKPV049zq87UC_V10oeA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pjgLftH_H2eSj9RztTH52UcIOnAYEDrbffaVxLFjBROSibB2z7kqTXxMMnoAebfgr6fWOweW-1lJmg7BN3gUs7Q?PARTNER=WRITER" align="left" border="0" /></a> I continued monitoring and caught sight of a red 1972 MGB GT, with no reserve that was in need of some restoration and maintenance&#8230; over the course of the week I emailed the seller numerous detailed questions, he was extremely helpful answering all my questions and sending me additional photos of various problem areas that would need repaired. </p>
<p><a href="http://ip4kla.bay.livefilestore.com/y1peoelEPKUhnS_l0iwn2Rdq9ZXbjThgBCUoUPmTL1XxBISsjgKDbDit7Ma4Tad8OM_6Tud7P86kIBqShTUSxJpnQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1p1ONMbr0-us0c9-Wb6eyrJqcOvTJ2EZ22YYzve4JwOiik5KTSlVIhP9GXhZ41L6EdmsYl5BsGiDUT6BB96p137g?PARTNER=WRITER" align="right" border="0" /></a> Come the end of the auction I luckily won it by one pence. The wife got a giggle that I won the auction by only one pence! </p>
<p>I made arrangements with the owner to pick it up from Heathrow airport and booked my flights down for the following weekend. Flying down on the first flight on 29th Nov, I spent the day (coldest of the year, in car with no working heater) driving back up. </p>
<p>The car did have a slight misfire on the journey back, but I just kept the revs low and took my time and it got me back home with only a few minor hiccups. </p>
<p><a href="http://ip4kla.bay.livefilestore.com/y1pJopgwyVPZks37wltiK37F3yU5-mwfLiuwPe9FWv-2yxY8Yue_rK4U1F0PUJ2O0Z9ZRXLgWTW68aocUd01hbpCw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pEgZcyeS4-CqA1crMY7NPm_Es4Qc4clmw-_hhgiLwUUGYUG0PWcJhDoOM61-cFC5jdWpuKuqHDRtANuwoMMs0XA?PARTNER=WRITER" align="right" border="0" /></a> <a href="http://g1fezg.bay.livefilestore.com/y1pyhIElelxePLcrliOXCDhLmi6v7oUQcx6Gg-xqMMsujxMaLdPDsLa6Mg_VuI0y13MrqefV0pDn19yD_aC-1UsXQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pT0RzVXoqcnaMNbfSKH1r-Vf5nIlwdTDR9bR3tEkikO04CJLNGXTRVUR424tFgoehOr0lkU1fVEw6ei6TO5-zKg?PARTNER=WRITER" align="right" border="0" /></a><a href="http://widz2q.bay.livefilestore.com/y1pv-mOEPVPu6pH4ZEq6yk2QphF-Uzzf-tUZB4_gjVCmdTSBqCINcrGUS-jD4-rqJnX_0RFQ5uXz58k0NqMSGdTWA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pOW6xoaWQMdJ6T5skTS0gJaupQKf5AMbVuNLxwQdcYeqKdfntvTXZJPqWAfadySwesm8PV6tbb6FQgy710UgVIw?PARTNER=WRITER" align="right" border="0" /></a> The next morning the misfire was much more noticeable and it was apparent that would be my first task, but I will leave that for my next post.</p>
</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=4&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/01/06/1972-mgb-gt-part-1-a-project-to-keep-my-sanity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pTdgcq0zbQMScoi7AbAbcIEBuigAzolyj5-hzVOPMRNAMRxMindSRgbXE7MCkQKERXsVWvNcE2lvcOY5zvnjKUg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pDDKuHiIqnVtd-pACo5Q8Iroc4PMtVnQ1-pX2Ri5WO8NY36UMpEht-eLEoPPTaoUr3lDPb4Qli9s-lHQd55Iumg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pgM0JnT7wFeCXNw12MFYCyqX-vykP_Iot8brEfHg7lPOcaBjVputuMX1gZXkt7VyAscEpKfcddalrR5Tq1sv_EQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p4ZYRJgvpq-bAQM8a4MPLAjMnSB1gFuScJnxRLZtRnpOugQ3bAiAVPzrnEZrZ3LteGIfFfmcjWJFnITuFotxO0Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p0vqar1rcxpNzZlGCFHL4tVJi2qSrWkOzKCaz7QWOCdT8p5gnHOuqKCWrjbMfq7SwGH6bSWQD96e-ZyZe3YIOzw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p8u__aQ1FlfBYT8q0Uo30SnI-xfkD0welBYHUgMUS5m2JuNWJuQ44weOU-pfZVe-DcdgqC-_c_RH0qSMZw9iVXw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pjgLftH_H2eSj9RztTH52UcIOnAYEDrbffaVxLFjBROSibB2z7kqTXxMMnoAebfgr6fWOweW-1lJmg7BN3gUs7Q?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1p1ONMbr0-us0c9-Wb6eyrJqcOvTJ2EZ22YYzve4JwOiik5KTSlVIhP9GXhZ41L6EdmsYl5BsGiDUT6BB96p137g?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pEgZcyeS4-CqA1crMY7NPm_Es4Qc4clmw-_hhgiLwUUGYUG0PWcJhDoOM61-cFC5jdWpuKuqHDRtANuwoMMs0XA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pT0RzVXoqcnaMNbfSKH1r-Vf5nIlwdTDR9bR3tEkikO04CJLNGXTRVUR424tFgoehOr0lkU1fVEw6ei6TO5-zKg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pOW6xoaWQMdJ6T5skTS0gJaupQKf5AMbVuNLxwQdcYeqKdfntvTXZJPqWAfadySwesm8PV6tbb6FQgy710UgVIw?PARTNER=WRITER" medium="image" />
	</item>
		<item>
		<title>Our family pets (the Zoo!).</title>
		<link>http://developtheweb.wordpress.com/2009/01/04/our-family-pets-the-zoo/</link>
		<comments>http://developtheweb.wordpress.com/2009/01/04/our-family-pets-the-zoo/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 14:47:01 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Pets]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2009/01/04/our-family-pets-the-zoo</guid>
		<description><![CDATA[To go along with our 3 boys we have 2 dogs&#8230; Robbie a cross breed, and Sophie a Jack Russell Terrier, both of whom we adopted. Robbie we adopted Nearly 8 years ago from the NCDL (now Dogs Trust), he was around 5 years old at the time so is getting on a bit now [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=9&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!311" class="bvMsg"><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /></p>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td valign="top"><a href="http://byfiles.storage.msn.com/y1pk0r2Bp7RKbGEgIswtDrTgnm0K7oL9Bf0Dat40nf-gxupxkcr1XbN7kWyjfFkqAaNjk0egFwNcANKqzgFS1voVQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pMXiAFFXaoRTZPVUFWTTZ5lfhzOcJjCp8VDDHhUslqUt9c2iMdw_XhdUfXROkntcDXtBuhsUq6XyIH6afaQ-0fA?PARTNER=WRITER" align="right" border="0" /></a>To go along with our 3 boys we have 2 dogs&#8230; Robbie a cross breed, and Sophie a Jack Russell Terrier, both of whom we adopted. </p>
<p><a href="http://g1fezg.bay.livefilestore.com/y1pmaxpyI7FzU6AmdxOBcY149WpyZi1pjcCYTefofQiAmcZJFQflImuOsbn7xCI5mnwDKYo079RCMSmEYt1VVDljw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pTOcOmx6Z3nYe7kKhAwtYpU05kg_El0opvwKbAUcd9rvQczfX3SC4QDLtwchBUsM4hCKDOSHSCMulTg64z3LOFw?PARTNER=WRITER" align="left" border="0" /></a>Robbie we adopted Nearly 8 years ago from the NCDL (now Dogs Trust), he was around 5 years old at the time so is getting on a bit now but despite recently going deaf he still has that puppy glint in his eyes.  <br />  </p>
<tr>
<td valign="top"><a href="http://vlw7tg.bay.livefilestore.com/y1pyLZlyxfCCH0bJU9o5ttdgVz0yL9kdEbEoMzVGdGLc8erZmTkkPcOp3MhGuIqQ_jD7h6fS2nhln-4tkbkd0LTZA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pcSRtZU43b2OavEzOz_0kYBhq-fxggMKSOp58_bvsf7AjY1aW6sZhFvqdLefE-AMN?PARTNER=WRITER" align="right" border="0" /></a><a href="http://vlw7tg.bay.livefilestore.com/y1pthni4yCXTKHoq6EJjZcuHjGPGP3GzudRxs_98IZ_P3OGpbhtM8nxVObUVJ1gVIEvOznGdtpNFAM?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pDLJSPd7IAXz-EiZNVJIY93OpId1SH4br3Vo04nJZVGRdh5nVADWdYhwniv_NpBCR_ge_4m9i1ZQhnFKKBdIkGQ?PARTNER=WRITER" align="right" border="0" /></a> Sophie (who was previously called Honey), we adopted in spring 2008&#8230; my Mother had taken her in from someone living in Auchinleck when she moved to Melrose having lived abroad for a few years, but found her a bit much with work and other commitments, so she came to live with us and was renamed to Sophie. <br />  </p>
<tr>
<td valign="top"><a href="http://vlw7tg.bay.livefilestore.com/y1pW3xdwdzgHfY40ssJlbk9_Cwfvb50i5yEE-wp74YjObqEKRRaw2UbEHWj6mF_4eBSPt8X5zu4j0s?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pSCjmiUjvhq6ZYZIbNkDjVqzGMVg5J6q_s2xMCX2EQ9_RQ4IPJsgqpmq_oo1yh0ng3iw_vIPV-L2AGDYcAUTb6A?PARTNER=WRITER" align="left" border="0" /></a>Sophie was around 2 years old when we adopted her and her arrival brought a new lease of life to Robbie, who seems to have enjoyed teaching her how to play fight, eat carrots and many other things. <br />  </p>
<tr>
<td valign="top">  </p>
<hr />
  </p>
<tr>
<td valign="top">
<p align="left">In addition to the two dogs, we have a hamster, Gilbert, and the wife got herself 4 baby Giant African snails a couple of months ago. </p>
<p align="center"><a href="http://byfiles.storage.msn.com/y1pgdPlmStx1sPHbD8V3-a8EFt8P9PdiC9qg9HellexrRU1BHaeJMsLtV56Rgtd2gWj?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1phNcEE5sg3TNkEBoO3mZHcU-YEj_4sj_y56P289TWxNIcCNmXlfMJC7YhMT1L2xpqzI2MeBEgH6_W_cl8WDptzA?PARTNER=WRITER" border="0" /></a> <a href="http://byfiles.storage.msn.com/y1pYpEtHpissLyxzBJgUTOJE8zwG3w1_qjS7030pEjP2tOexmoc_TcOLj67ByG_RKTv4O3Vx1HRdVgp4KAkLIP3fg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pXnl1NALUr6Dt0WRYZnZaUigCVDvw29sK_DRt4ksrb0eOB9al9XRMHFYeMY0X-6zy9Bw-JnM3kdXyMSahfOgOSg?PARTNER=WRITER" border="0" /></a> <a href="http://vlw7tg.bay.livefilestore.com/y1pwqhUPLOfybYPKXCVuilF51aC9tDOFGr4HasBzHOsc-KtndJIbQJqCfgTNb3GUqH-w0-vebCg7TU5bUmHGfhAvw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pLAh2ZlJXtvL4udLZtHxDYWjFBtyBC8Lzvkd8vmBCoJK5vJdUxhRPPpR42CX4Ywr-MsJvW2v7HzpcnbWaU7XlHQ?PARTNER=WRITER" border="0" /></a> <a href="http://byfiles.storage.msn.com/y1p48S8jONv8MWnGI38MpFFVXwGyC6U9n1ThUem3IyQdgd_qk-BMFIeG9XRkYejs27E6-CQq0Ynazl409k6NaWPGQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pJzYll0k0Sk55ny2CYBVQYUj0s46jv9_ky6ZpKZyXWRDLCbaX35be2fUI6P5r3vk6ffZyWKVSy-8vHMwlFpF2dg?PARTNER=WRITER" border="0" /></a> <a href="http://vlw7tg.bay.livefilestore.com/y1pJbAE57GJ77KrB5t7uy-oW7gorDiKfh_UquK6GCGIJCs81aWLYJB53tCksdJ-rly984qOPFYK_nYrGIsVESKvcw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pXVeJ0Ptao1THGN8XDadSlWAx4TnYp4iCAZ8Ff7emXd6I4tCvW62a8xmR8Hq17InLLB5pSH8iMilzqmxGaugL3w?PARTNER=WRITER" border="0" /></a> </p>
<tr>
<td valign="top">  </p>
<hr />
  </p>
<tr>
<td valign="top">
<p align="left">For Christmas this year, our family expanded again, with the addition of a further two pets&#8230; </p>
<p>To our surprise our youngest, Caelan, expressed a strong desire to have a snake several months back. Despite being only four and normally jumping from one thing to the next in a blink of an eye, he kept constant with this one (much to mummy&#8217;s delight since she had been dying for an excuse to get one). </p>
<p align="center"><a href="http://g1fezg.bay.livefilestore.com/y1pNuYCChNhwPf_toE8mlY88XS9C13aLJY4WOipbOaSCHI-e2fBJ7KCyiOLRf_3zpEtbeON9y_puIDeu8TNEpXDfA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pyGKmGL18mWHJ-bp0mwCIJXBS57i_CUCarndXsv3q1LPGwQXmDhO5F806PfGcHORBDUDwaWKBLM8YVoH8qlGJKA?PARTNER=WRITER" border="0" /></a><a href="http://vlw7tg.bay.livefilestore.com/y1pl2VoYAUO1JhPGNJeUXfZ_K_58rPzQqw19Bc7eXnIGMbrCo7ANYgR96uCe6axt7bW_a35ZlAPDgVF2Y6gkjLG0w?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pbfaZ3jICVcm-Q2VqtcXyVniwsI6BHQO4BE3vV1M0OeYzMjFXPye8DYpjPvx2uQtf-yWU3XA8cnzyLllt7hA-9A?PARTNER=WRITER" border="0" /></a><a href="http://g1fezg.bay.livefilestore.com/y1pIOOrhOPV0-1yALTQCSbH38W7SQMolGtvgFr0v4uD4AgBRlmuZiFApQ6VqiVSv5uslzUeMhTNGbD2Mk7ojqm1Rw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pWl80AkWY2sQKaOwlFpUdxzbLx8qUG1jhgYUTSf4SiEXGRCXYpNHq1VkiNNrzNurminiBbPQ0hgJ_fugIeMr25w?PARTNER=WRITER" border="0" /></a><a href="http://g1fezg.bay.livefilestore.com/y1piUWULBxWSZRb6oH7wzoZFh-CRjdRiCNOisuynBejW5fxZjneXF79J2fGnk5Mc_SDnP06bgK8ed0Xh5qrNWYVGg?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pQ1LHFAXM1xcsgr2DQNeD2lqiPaeOhQeEGkxmVKG4LuOz7piHhPYVIfk-5rwj1r5LIMyMtt3FSlKdhoDuuxquUA?PARTNER=WRITER" border="0" /></a> </p>
<p align="left">So as a nice Christmas surprise, a 3 month old Miami Corn Snake would be his &quot;big&quot; present this year. This was much to his delight since, since he seemed to have expecting a toy one, given they are not common pets. He instantly loved it, was very eager to hold it (even attempting to give it a kiss) and he named it &quot;Boy-snake&quot;! </p>
<tr>
<td valign="top">  </p>
<hr />
  </p>
<tr>
<td valign="top">
<p align="left">The second pet to join our family this Christmas, yet to be named, was a Red Knee Tarantula.  </p>
<p>Kieren, the middle boy, had mentioned sometime ago that he would like a Tarantula. Not to discourage something that would make most kids squirm we told him that he couldn&#8217;t just declare that he wanted one&#8230; They need looking after, can live for a long time and he doesn&#8217;t know what is required or what they need. </p>
<p align="center"><a href="http://g1fezg.bay.livefilestore.com/y1pTOCr5emPD-r7DLO_pKyPWQpmMPCLHok6MBW1h9oD0XczxSstp3-6p-9NIjT7gwGxd0WV9CV6nXcQwalx-073YQ?PARTNER=WRITER"></a><a href="http://g1fezg.bay.livefilestore.com/y1pPv-6_4VF7ovFt34fofxsm2Cxkl04-5MNpkyiSvjrUXos5PN1l-ZJQDf7C9OvuSU8n3S4l4-C-HEoO-QL1VM1xQ?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pAC3pKcA8USXQ6w7NtxszQhrb6XxwrvE79F2y_dxtNFNC6pGRzN4iwgZIS1kz2Ptol-0cD_B9XMZfCJQkzdtr8A?PARTNER=WRITER" border="0" /></a><a href="http://vlw7tg.bay.livefilestore.com/y1pgDweuigZT4lAv3T6P5C3Kqi30MxmeTMfiOwvVGhzb4GpiDLcI1vWs0ak0mJV0JGPXh-gZoSk6PtkWk23vdgyFA?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1plA4S0moJTJWXLCSY8MJJvsSqogFukfHolLxNSFR9Q74OQ4YChA5wDeGykwy-iE3PXkUIzPobLpANW1VZkskTrw?PARTNER=WRITER" border="0" /></a><a href="http://byfiles.storage.msn.com/y1pwdAlb8nEm1AJIXL32IuriULz4EGsR8CyJ5zRxI9II5hrz43SsCkRPampz_EFSl05TRSaVdWIzQrSyXly2hNcbw?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pgbBUwV5uSaxAKUR8v2E_yxPhWnGnlmmD3al7o3uGqtUPT2Pre1PlRjOz-EELybfz7xf8DBfShmQGo08DdhWAAQ?PARTNER=WRITER" border="0" /></a> </p>
<p align="left">To his credit he went off on his own and researched it with impressive vigour. Researching which types are best for pets and indeed which are best as a beginner pet. He researched what they eat, how long they live, how to look after one and showed great enthusiasm giving us lots of information about them. This gave the wife the green light to go off and get a baby spiderling for his Christmas. </p>
<p align="left">Yesterday the Spider shed it&#8217;s first skin and &#8216;Boy-snake&#8217; shed it&#8217;s first skin (with us) on boxing day.  </p>
</p>
</td>
</tr>
</td>
</tbody>
</table>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/9/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/9/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/9/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=9&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2009/01/04/our-family-pets-the-zoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pMXiAFFXaoRTZPVUFWTTZ5lfhzOcJjCp8VDDHhUslqUt9c2iMdw_XhdUfXROkntcDXtBuhsUq6XyIH6afaQ-0fA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pTOcOmx6Z3nYe7kKhAwtYpU05kg_El0opvwKbAUcd9rvQczfX3SC4QDLtwchBUsM4hCKDOSHSCMulTg64z3LOFw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pcSRtZU43b2OavEzOz_0kYBhq-fxggMKSOp58_bvsf7AjY1aW6sZhFvqdLefE-AMN?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pDLJSPd7IAXz-EiZNVJIY93OpId1SH4br3Vo04nJZVGRdh5nVADWdYhwniv_NpBCR_ge_4m9i1ZQhnFKKBdIkGQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pSCjmiUjvhq6ZYZIbNkDjVqzGMVg5J6q_s2xMCX2EQ9_RQ4IPJsgqpmq_oo1yh0ng3iw_vIPV-L2AGDYcAUTb6A?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1phNcEE5sg3TNkEBoO3mZHcU-YEj_4sj_y56P289TWxNIcCNmXlfMJC7YhMT1L2xpqzI2MeBEgH6_W_cl8WDptzA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pXnl1NALUr6Dt0WRYZnZaUigCVDvw29sK_DRt4ksrb0eOB9al9XRMHFYeMY0X-6zy9Bw-JnM3kdXyMSahfOgOSg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pLAh2ZlJXtvL4udLZtHxDYWjFBtyBC8Lzvkd8vmBCoJK5vJdUxhRPPpR42CX4Ywr-MsJvW2v7HzpcnbWaU7XlHQ?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pJzYll0k0Sk55ny2CYBVQYUj0s46jv9_ky6ZpKZyXWRDLCbaX35be2fUI6P5r3vk6ffZyWKVSy-8vHMwlFpF2dg?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pXVeJ0Ptao1THGN8XDadSlWAx4TnYp4iCAZ8Ff7emXd6I4tCvW62a8xmR8Hq17InLLB5pSH8iMilzqmxGaugL3w?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pyGKmGL18mWHJ-bp0mwCIJXBS57i_CUCarndXsv3q1LPGwQXmDhO5F806PfGcHORBDUDwaWKBLM8YVoH8qlGJKA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pbfaZ3jICVcm-Q2VqtcXyVniwsI6BHQO4BE3vV1M0OeYzMjFXPye8DYpjPvx2uQtf-yWU3XA8cnzyLllt7hA-9A?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pWl80AkWY2sQKaOwlFpUdxzbLx8qUG1jhgYUTSf4SiEXGRCXYpNHq1VkiNNrzNurminiBbPQ0hgJ_fugIeMr25w?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pQ1LHFAXM1xcsgr2DQNeD2lqiPaeOhQeEGkxmVKG4LuOz7piHhPYVIfk-5rwj1r5LIMyMtt3FSlKdhoDuuxquUA?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pAC3pKcA8USXQ6w7NtxszQhrb6XxwrvE79F2y_dxtNFNC6pGRzN4iwgZIS1kz2Ptol-0cD_B9XMZfCJQkzdtr8A?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1plA4S0moJTJWXLCSY8MJJvsSqogFukfHolLxNSFR9Q74OQ4YChA5wDeGykwy-iE3PXkUIzPobLpANW1VZkskTrw?PARTNER=WRITER" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pgbBUwV5uSaxAKUR8v2E_yxPhWnGnlmmD3al7o3uGqtUPT2Pre1PlRjOz-EELybfz7xf8DBfShmQGo08DdhWAAQ?PARTNER=WRITER" medium="image" />
	</item>
		<item>
		<title>Customizing Visual Studio 2008 Prerequisites to allow for Visual C++ 2005 Runtime</title>
		<link>http://developtheweb.wordpress.com/2008/06/23/customizing-visual-studio-2008-prerequisites-to-allow-for-visual-c-2005-runtime/</link>
		<comments>http://developtheweb.wordpress.com/2008/06/23/customizing-visual-studio-2008-prerequisites-to-allow-for-visual-c-2005-runtime/#comments</comments>
		<pubDate>Mon, 23 Jun 2008 16:18:14 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Visual Studio 2008/2005]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2008/06/23/customizing-visual-studio-2008-prerequisites-to-allow-for-visual-c-2005-runtime</guid>
		<description><![CDATA[Ran into a problem a while back after upgrading to Visual Studio 2008 and thought I would share it. When upgrading a group of projects that included an installer project which in turn includes the Visual C++ Runtime (2005) as a prerequisite, to Visual Studio 2008, it is not immediately obvious that the Visual C++ [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=10&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!222" class="bvMsg">
<p><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /><br />Ran into a problem a while back after upgrading to Visual Studio 2008 and thought I would share it. </p>
<p>When upgrading a group of projects that included an installer project which in turn includes the Visual C++ Runtime (2005) as a prerequisite, to Visual Studio 2008, it is not immediately obvious that the Visual C++ Runtime included in the prerequisites for Visual Studio 2008, is the 2008 version only. </p>
<p>The application I am currently working on uses a third party component whose prerequisite include the Visual C++ 2005 Runtime, so it is not under my control which version it needs. Components developed for C++ 2005 will not register with the C++ 2008 Runtime installed. </p>
<p>In order to include the 2005 runtime in the prerequisites list within you must add them in as custom prerequisites for Visual Studio 2008 installers. </p>
<p align="center"><a href="http://byfiles.storage.msn.com/y1pzu-ReAlt65SO-ABOuQjnuTOvoag0MOkzqdNDHvnJ2w8iAMR54IHI1ucUVqHEzeNNz-GlgQimUavB4iYERcisx0HbYTTPe-xR?PARTNER=WRITER"><img src="http://byfiles.storage.msn.com/y1pzu-ReAlt65Rm14CYqfpFU5m3vvgcCeRX1VVvcucsDQGI97Qvah59G3kAWkE1w__dxTZ79M2AiqSzSjLbsZG_kBnZzZHjXQPb?PARTNER=WRITER" border="0" /></a> </p>
<p>This requires getting a copy of the Visual C++ 2005 Runtime installers and placing them in the Visual Studio 2008 folder (or vice versa). You will need to rename the folders as the folders and file names for 2005 and 2008 C++ Runtimes are the same. Once in the folder they will also need modified so that you can tell which are which (2005 or 2008), you do this by modifying the &quot;package.xml&quot; file held in the &quot;en&quot; folder of each package. </p>
<p>Once modified Visual Studio will pick up the new list and allow you to select the correct version. </p>
<p>Visual Studio 2008&#8242;s packages folder has changed and is now in the SDKs folder, on 32bit OS systems this will be &quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages&quot; and on 64bit OS systems it is &quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages&quot; (default paths). </p>
<p>For Visual Studio 2005 the packages folder is in a sub folder of the install path, on 32bit OS systems this is &quot;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages&quot; and on 64bit systems it is &quot;C:\Program Files (x86)\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages&quot; (default paths). </p>
<p>In case you do not have access to the packages for the previous versions, I have uploaded them to my SkyDrive, <a title="Visual C++ Runtime Packages (2005 x86, 2005 x64 and 2008 x86) for use as prerequisites in Visual Studio 2008 (or 2005, with different path)." href="http://cid-e222dd65c0999331.skydrive.live.com/self.aspx/Visual Studio Files/C++ Runtime Packages for Visual Studio 2008.exe" target="_blank">click here</a> to download. </p>
<p>Paul B<br /><em>MCP</em></p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/developtheweb.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/developtheweb.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=10&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2008/06/23/customizing-visual-studio-2008-prerequisites-to-allow-for-visual-c-2005-runtime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://byfiles.storage.msn.com/y1pzu-ReAlt65Rm14CYqfpFU5m3vvgcCeRX1VVvcucsDQGI97Qvah59G3kAWkE1w__dxTZ79M2AiqSzSjLbsZG_kBnZzZHjXQPb?PARTNER=WRITER" medium="image" />
	</item>
		<item>
		<title>Supporting custom built email applications (using TELNET to verify connectivity).</title>
		<link>http://developtheweb.wordpress.com/2008/04/04/supporting-custom-built-email-applications-using-telnet-to-verify-connectivity/</link>
		<comments>http://developtheweb.wordpress.com/2008/04/04/supporting-custom-built-email-applications-using-telnet-to-verify-connectivity/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 06:57:05 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Software Development (Support)]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2008/04/04/supporting-custom-built-email-applications-using-telnet-to-verify-connectivity</guid>
		<description><![CDATA[As a software developer and/or someone who is involved in the support of software, it is often useful to prove to a client that the software is not at fault. This is doubly important if your application manages emails, given the business relevance email systems have in modern times. As a developer who may have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=19&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!211" class="bvMsg">
<p><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" /><br />As a software developer and/or someone who is involved in the support of software, it is often useful to prove to a client that the software is not at fault. This is doubly important if your application manages emails, given the business relevance email systems have in modern times. </p>
<p>As a developer who may have developed Microsoft Office based Applications in VBA, you may know that if Office get&#8217;s stuck waiting on a bit code to complete or some part of the application is taking considerable time to process something, it will appear to freeze. &quot;DoEvents&quot; and some sort of progress windows is always advised, but not always possible if the thing that is being processed is out-with your control. </p>
<p>An example of this would be if you have an Microsoft Office based Application that receives, files and controls emails. If there is a problem with a clients email server, or the pop3 is running very slow, a Microsoft Office based Application would appear to freeze as you cannot process the incoming email on a separate thread. </p>
<p>Other applications based on other languages would be less likely to freeze as the developer will likely have the opportunity to run such processes on a separate thread to the main application. As such the end user would most likely be completely unaware that slow connection or problem with their ISP existed. The developer would have the opportunity to cancel a process after a set timeout if it continued to fail to respond and report it to the user. Even so the client may still assume the blame is with the software rather than their service provider. </p>
<p>It therefore becomes essential to prove your case to a client. </p>
<hr />
<p>One of the easiest and effective ways of proving your application is not at fault is to use a telnet client. </p>
<p>A telnet client is often overlooked as a tool, as people might assume it is only used to connect to a telnet service but it is very useful tool if you wish to check your email connectivity or even if you just want to see how many emails are waiting for you. </p>
<p><strong><font color="#800000">NOTE: Windows has always had it&#8217;s own telnet client built in, accessible via the command prompt. As of Windows Vista, it is now an optional component, that you must switch on (via the &quot;Turn Windows Features On or Off&quot; window in &quot;Programs and Features&quot;, which is accessed via the control panel).</font></strong> </p>
<p>To run telnet simply open the command prompt on your system and type <strong>TELNET</strong> and press return. </p>
<p>You will then be in the telnet client. To connect to an email server you must use the <strong>OPEN</strong> command, ensuring you use the correct port number. The format of the command is: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">open mymail.myserver.com portnumber</font></strong></p></blockquote>
<p>Email port numbers, by default, are port 25 for sending and port 110 for receiving emails. </p>
<hr />
<h1><font face="Arial" size="3">Retrieving emails using Telnet client (POP3)&#8230;</font></h1>
<p>So if you wanted to check your incoming mail from your ISP you could type: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">open popmail.ispserver.com 110</font></strong></p>
</blockquote>
<p>You should then get a response code 220 followed by some server details, if your connection was successful and the server is available. </p>
<p><em>NOTE: Most servers will disconnect quite quickly if you do not submit a request.</em> </p>
<p>To check your inbox you must then authenticate yourself. This is done using the <strong>USER</strong> command followed by your login name. Once you get an OK response from the server for the user name you must then enter your password with the <strong>PASS</strong> command. For example: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">user myemail@mydomain.com</font></strong></p>
</blockquote>
<p>Response comes back along the lines of +OK </p>
<blockquote></blockquote>
<blockquote>
<p><strong><font face="Courier New" size="2">pass mypassword</font></strong></p></blockquote>
<p>Response comes back along the lines of +OK </p>
<p><em>NOTE: Most basic telnet clients (including the Windows one) do not like it when you use the delete or backspace buttons. So if you miss-type a command you must re enter it, not just delete and type over. This is because the delete character is sent with the command rather than deleting the content you just typed.</em> </p>
<p>Once connected there are several commands you can use, some are: &#8211; </p>
<p><strong>LIST </strong><br />This will show a list of all the emails in your inbox, often only showing the email ID and the size. </p>
<p><strong>RETR +<br /></strong>Where + is the email ID number will retrieve an email (i.e <strong>RETR 1</strong> will retrieve email id 1). </p>
<p><strong>DELE +</strong><br />Where + is the email ID number will delete an email (i.e <strong>DELE 1</strong> will delete email id 1). </p>
<p><strong>QUIT</strong><br />Will close your connection to the server. </p>
<p>If there is a problem with a pop3 server running slow you can use the <strong>RETR</strong> command to demonstrate the download response of the server when collecting an email. It is not unusual for a pop3 server to slow considerably, it may be a hardware problem, it may be backing up to a backup device, it may even be a DoS (Denial of Service) attack against the server. When using the <strong>RETR</strong> command the response time is visible as you can see progressively how long it takes for the message to be received as each chunk of data is received and displayed. </p>
<hr />
<h1><font face="Arial" size="3">Sending emails using Telnet client (SMTP)&#8230;</font></h1>
<p>Similarly you can use telnet to check the availability of a clients SMTP server for sending emails. </p>
<p>From the telnet client type: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">open smtpmail.ispserver.com 25</font></strong></p>
</blockquote>
<p>You should get a 220 response message back. </p>
<p>Then you will need to declare where you are sending from, this should really be the fully qualified domain name as seen by the outside world. To do this you must use the <strong>HELO </strong>command (sometimes <strong>EHLO</strong>). For example: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">HELO mydomain.com</font></strong></p>
</blockquote>
<p>You should get a 250 response back. </p>
<p>This much tells you if your SMTP server is available. </p>
<p>It gets a bit more complicated if your SMTP server requires authentication, as you must first encode your username and password as Base64. There are some tools online that can do this (though I would never recommend supplying your username and password to one), as well as a few tools you can download. </p>
<p>In the example I use below the base64 encoding of the word<strong> username</strong> is <strong>dXNlcm5hbWU=</strong> and of the word <strong>password </strong>is<strong> cGFzc3dvcmQ=</strong> </p>
<p>If your SMTP server did require authentication and your username was <strong>username</strong>. Then the command would be: &#8211; </p>
<blockquote>
<p><strong><font face="Courier New" size="2">auth login dXNlcm5hbWU=</font></strong></p>
</blockquote>
<p>From which you should get a 334 response back asking for password, if your password was password you would simply respond. </p>
<blockquote>
<p><font face="Courier New" size="2"><strong>cGFzc3dvcmQ=</strong></font></p></blockquote>
<p>From which you should get a 235 response. </p>
<p>Once connected, with ESMTP if required or without if not, you can test the ability to send messages. To send a message you must use the<strong> MAIL FROM</strong> command, the <strong>RCPT TO</strong> command and the <strong>DATA</strong> command. For example: &#8211; </p>
<blockquote>
<p><font face="Courier New" size="2"><strong>MAIL FROM: myemail@mydomain.com</strong></font></p></blockquote>
<blockquote>
<p>Response should come back as a 250 message.</p></blockquote>
<blockquote>
<p><font face="Courier New" size="2"><strong>RCPT TO: myrecipient@theirdomain.com</strong></font></p></blockquote>
<blockquote>
<p>Response should come back as a 250 message.</p>
</blockquote>
<blockquote>
<p><font face="Courier New" size="2"><strong>DATA</strong></font>&lt;press return&gt;<br /><font face="Courier New" size="2"><strong>Subject: My Test Email</strong></font>&lt;press return&gt;<br />&lt;press return&gt;<br /><font face="Courier New" size="2"><strong>My test message goes here.</strong></font>&lt;press return&gt;<br /><font face="Courier New" size="2"><strong>.</strong></font>&lt;press return&gt;</p>
</blockquote>
<p>The final response you should get back is another 250 message saying it has been sent or queued. </p>
<hr />
<p>Now obviously if you can send and receive emails with telnet and not your application, and you are certain the problem is not with your application then the cause of your original problem would more likely be some firewall or anti-virus software blocking your application. </p>
<p>Paul B<br /><em>MCP</em></p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/developtheweb.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/developtheweb.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=19&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2008/04/04/supporting-custom-built-email-applications-using-telnet-to-verify-connectivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />
	</item>
		<item>
		<title>How to&#8230; Showing a sub-query containing multiple rows within one column of a SELECT statement (using CROSS APPLY and SQL&#8217;s XML abilities)</title>
		<link>http://developtheweb.wordpress.com/2008/03/18/how-to-showing-a-sub-query-containing-multiple-rows-within-one-column-of-a-select-statement-using-cross-apply-and-sqls-xml-abilities/</link>
		<comments>http://developtheweb.wordpress.com/2008/03/18/how-to-showing-a-sub-query-containing-multiple-rows-within-one-column-of-a-select-statement-using-cross-apply-and-sqls-xml-abilities/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 03:07:07 +0000</pubDate>
		<dc:creator>developtheweb</dc:creator>
				<category><![CDATA[Microsoft SQL Server Scripts and Development]]></category>

		<guid isPermaLink="false">http://developtheweb.wordpress.com/2008/03/18/how-to-showing-a-sub-query-containing-multiple-rows-within-one-column-of-a-select-statement-using-cross-apply-and-sqls-xml-abilities</guid>
		<description><![CDATA[It is often necessary to associate multiple rows within one table to a single row within another table, for example several contacts associated with one company, or several categories mapped to one company or contact. This raises the problem of how to allow your end users to search on multiple items rather than just one, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=16&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div id="msgcns!E222DD65C0999331!207" class="bvMsg">
<p><img src="http://c46.statcounter.com/3733482/0/363c976d/0/" align="right" width="0" height="0" />It is often necessary to associate multiple rows within one table to a single row within another table, for example several contacts associated with one company, or several categories mapped to one company or contact. </p>
<p>This raises the problem of how to allow your end users to search on multiple items rather than just one, and only display the main route item once. </p>
<p>Let me explain a scenario that you might encounter: &#8211; </p>
<p><a href="http://by1.storage.msn.com/y1pzu-ReAlt65TusX--d0XEABSxyqh5La7m5CZJqIJbMWidXthQgERQ_inD6CfobEPYAsOwy_kBXo_c_CcLauGOnQ?PARTNER=WRITER" target="_blank"><img src="http://by1.storage.msn.com/y1pzu-ReAlt65QAvQiZi4jPUUFGuhpP0LxkHrAlVEMurjsnQS7MkRb5-_q7tjxgiGDEL-fkkUXdkSlfMq1UD2P20A?PARTNER=WRITER" align="right" border="0" /></a>You have a contacts table, which is linked to a companies table, which is again liked to a keywords table. Any one company can have multiple contacts and multiple keywords associated with it. </p>
<p>Now say you want to allow a multi keyword search against the keywords table, but the search must contain both keywords for the same company and you only want one row per contact to be returned. You may also simple want to display all the keywords associated with a company when viewing a list of contacts. </p>
<p>Traditionally this would have been quite complex to achieve. However with Microsoft SQL 2005 and above&#8217;s support for the CROSS APPLY syntax, this becomes a whole lot easier to achieve. </p>
<hr />
<p><strong><font size="2">CROSS APPLY</font></strong> </p>
<p>Put simply CROSS APPLY is an INNER or OUTER JOIN between a table and a table-valued function. </p>
<p>A simple example is one commonly shown for the Microsoft AdventureWorks smaple database: &#8211; </p>
<blockquote><p><font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>USE</p>
<p></font><font size="2"><font color="#000000"> AdventureWorks<br /></font>GO </font><font color="#0000ff" size="2"></p>
<p>CREATE</p>
<p></font><font color="#000000" size="2"> </font><font color="#0000ff" size="2">FUNCTION</font><font size="2"><font color="#000000"> <br />    </font>Sales</font><font color="#808080" size="2">.</font><font size="2">fnTopNOrders</font><font color="#808080" size="2">(</font><font size="2"> <br />        @CustomerID </font><font color="#0000ff" size="2">AS</font><font size="2"> </font><font color="#0000ff" size="2">int</font><font color="#808080" size="2">,</font><font size="2"> @n </font><font color="#0000ff" size="2">AS</font><font size="2"> </font><font color="#0000ff" size="2">INT</font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#0000ff" size="2">RETURNS</font><font size="2"> </font><font color="#0000ff" size="2">TABLE</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> </font><font color="#0000ff" size="2">RETURN</font><font size="2"> </font></p>
<p>    <font color="#0000ff" size="2">SELECT</font><font size="2"> </font><font color="#0000ff" size="2">TOP</font><font color="#808080" size="2">(</font><font size="2">@n</font><font color="#808080" size="2">)</font><font size="2"> SalesOrderID</font><font color="#808080" size="2">,</font><font size="2"> ShipDate </font><font color="#808080" size="2">=</font><font size="2"> </font><font color="#ff00ff" size="2">convert</font><font color="#808080" size="2">(</font><font color="#0000ff" size="2">char</font><font color="#808080" size="2">(</font><font size="2">10</font><font color="#808080" size="2">),</font><font size="2"> ShipDate</font><font color="#808080" size="2">,</font><font size="2">112</font><font color="#808080" size="2">),<br /><font color="#333333">        </font></font><font size="2">TotalDue</font><font color="#808080" size="2">=</font><font color="#ff00ff" size="2">convert</font><font color="#808080" size="2">(</font><font color="#0000ff" size="2">varchar</font><font color="#808080" size="2">,</font><font size="2">TotalDue</font><font color="#808080" size="2">,</font><font size="2">1</font><font color="#808080" size="2">)</font><font size="2"> <br />    </font><font color="#0000ff" size="2">FROM</font><font size="2"> AdventureWorks</font><font color="#808080" size="2">.</font><font size="2">Sales</font><font color="#808080" size="2">.</font><font size="2">SalesOrderHeader<br />    </font><font color="#0000ff" size="2">WHERE</font><font size="2"> CustomerID </font><font color="#808080" size="2">=</font><font size="2"> @CustomerID </font><font color="#0000ff" size="2">ORDER</font><font size="2"> </font><font color="#0000ff" size="2">BY</font><font size="2"> TotalDue </font><font color="#0000ff" size="2">DESC<br /></font><font size="2">GO </font><font color="#0000ff" size="2"></p>
<p>SELECT<br />    </p>
<p></font><font size="2">StoreName</font><font color="#808080" size="2">=</font><font size="2">s</font><font color="#808080" size="2">.</font><font size="2">Name</font><font color="#808080" size="2">,</font><font size="2"> [Top]</font><font color="#808080" size="2">.</font><font size="2">ShipDate</font><font color="#808080" size="2">,</font><font size="2"> [Top]</font><font color="#808080" size="2">.</font><font size="2">SalesOrderID</font><font color="#808080" size="2">,</font><font size="2"> <br />    TotalDue</font><font color="#808080" size="2">=</font><font color="#ff0000" size="2">&#8216;$&#8217;</font><font color="#808080" size="2">+</font><font size="2">[Top]</font><font color="#808080" size="2">.</font><font size="2">TotalDue <br /></font><font color="#0000ff" size="2">FROM</font><font color="#000000" size="2"> AdventureWorks</font><font color="#808080" size="2">.</font><font color="#000000" size="2">Sales</font><font color="#808080" size="2">.</font><font color="#000000" size="2">Store </font><font color="#0000ff" size="2">AS</font><font size="2"><font color="#000000"> s<br /></font></font><font color="#808080" size="2">JOIN</font><font color="#000000" size="2"> AdventureWorks</font><font color="#808080" size="2">.</font><font color="#000000" size="2">Sales</font><font color="#808080" size="2">.</font><font color="#000000" size="2">Customer </font><font color="#0000ff" size="2">AS</font><font size="2"><font color="#000000"> c<br /></font></font><font color="#0000ff" size="2">ON</font><font color="#000000" size="2"> s</font><font color="#808080" size="2">.</font><font color="#000000" size="2">CustomerID </font><font color="#808080" size="2">=</font><font color="#000000" size="2"> c</font><font color="#808080" size="2">.</font><font size="2"><font color="#000000">CustomerID<br /></font></font><font color="#808080" size="2">CROSS</font><font color="#000000" size="2"> </font><font color="#808080" size="2">APPLY<br /></font><font size="2">    AdventureWorks</font><font color="#808080" size="2">.</font><font size="2">Sales</font><font color="#808080" size="2">.</font><font size="2">fnTopNOrders</font><font color="#808080" size="2">(</font><font size="2">c</font><font color="#808080" size="2">.</font><font size="2">CustomerID</font><font color="#808080" size="2">,</font><font size="2"> 5</font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [Top]<br /></font><font color="#0000ff" size="2">WHERE</font><font color="#000000" size="2"> CustomerType</font><font color="#808080" size="2">=</font><font color="#ff0000" size="2">&#8216;S&#8217;<br /></font><font color="#0000ff" size="2">ORDER</font><font color="#000000" size="2"> </font><font color="#0000ff" size="2">BY</font><font color="#000000" size="2"> StoreName</font><font color="#808080" size="2">,</font><font color="#000000" size="2"> </font><font color="#ff00ff" size="2">convert</font><font color="#808080" size="2">(</font><font color="#0000ff" size="2">money</font><font color="#808080" size="2">,</font><font color="#000000" size="2">TotalDue</font><font color="#808080" size="2">)</font><font color="#000000" size="2"> </font><font color="#0000ff" size="2">DESC<br /></font><font size="2">GO </p>
<p></font></p>
<p></strong></font>In this sample the table valued function returns the top &#8216;n&#8217; (largest) orders for a store. The SELECT statement would normally be limited to the stores, but with the CROSS APPLY join in place the store information can be combined (joined) with the results for the top orders (in this case the top 5 orders). </p></blockquote>
<p>The same result could have been achieved previously by using a temporary table and joining with that, but that can be tedious to code and maintain. Using CROSS APPLY to join the table to the function&#8217;s results is much neater and can be quite powerful. </p>
<hr />
<p><font size="2"><strong>Back to the problem&#8230;</strong></font> </p>
<p>So how does CROSS APPLY help us list all our keywords in one column for our company? </p>
<p>Well the answer comes from SQL&#8217;s XML features&#8230; which can return results as a table-value, with just one row and one column&#8230; and we can manipulate the format of the output so we have something nice and neat to work with. </p>
<hr />
<p><font size="2"><strong>FOR XML Clause</strong></font> </p>
<p>The FOR XML Clause has several modes that can run, which will determine the shape of that resulting XML. These modes are RAW, AUTO, EXPLICIT or PATH. </p>
<p>Without going into too much detail the mode we are interested in to help us with our problem is the PATH mode. So using the FOR XML PATH clause in our query. </p>
<p>The PATH mode provides a simple way to mix elements and attributes, in order to output some XML based on our data (for more in-depth details take a look at <a title="http://msdn2.microsoft.com/en-us/library/ms189885.aspx" href="http://msdn2.microsoft.com/en-us/library/ms189885.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/ms189885.aspx</a> and <a title="http://msdn2.microsoft.com/en-us/library/ms190922.aspx" href="http://msdn2.microsoft.com/en-us/library/ms190922.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/ms190922.aspx</a>) </p>
<p>Now in our problem we are looking to retrieve all the keywords for a company and display them in one column. So lets see what we can get from SQL using the FOR XML Clause </p>
<blockquote>
<p>If we simply used the following: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</font><font size="2"><font color="#000000"> Keyword </font></font><font color="#0000ff" size="2">FROM</font><font size="2"> cont_keyword </font><font color="#0000ff" size="2">WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> 19<br /></font><font color="#0000ff" size="2">FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font size="2"></font></strong></font> </p>
<p>We would be returned one table with one row that had one column. The contents of which would be something like: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>&lt;</p>
<p></font><font color="#800000" size="2">row</font><font color="#0000ff" size="2">&gt;<br />    &lt;</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;</font><font color="#000000" size="2">Reseller</font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;<br />&lt;/</font><font color="#800000" size="2">row</font><font color="#0000ff" size="2">&gt;<br />&lt;</font><font color="#800000" size="2">row</font><font color="#0000ff" size="2">&gt;<br />    &lt;</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;</font><font color="#000000" size="2">Ireland</font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;<br />&lt;/</font><font color="#800000" size="2">row</font><font color="#0000ff" size="2">&gt;</font></strong></font> </p>
<p>This is not quite what we are looking for so we shall modify the PATH mode clause to exclude the row element: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font><font size="2"><font color="#000000"> Keyword </font></font><font color="#0000ff" size="2">FROM</font><font size="2"> cont_keyword </font><font color="#0000ff" size="2">WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> 19<br /></font><font color="#0000ff" size="2">FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">)</font><font size="2"> </font></strong></font>  </p>
<p>Now we get an output something like: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>&lt;</p>
<p></font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;</font><font color="#000000" size="2">Reseller</font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;<br />&lt;</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;</font><font color="#000000" size="2">Ireland</font><font color="#0000ff" size="2">&lt;/</font><font color="#800000" size="2">Keyword</font><font color="#0000ff" size="2">&gt;</font></strong></font> </p>
<p>Which is getting much closer to something we can use. Now when outputting something as XML in SQL we can tell it to output any column as plain text without any element wrappers. This would be done as follows: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font><font color="#000000" size="2"> Keyword </font><font color="#0000ff" size="2">AS</font><font size="2"><font color="#000000"> [text()] </font></font><font color="#0000ff" size="2">FROM</font><font size="2"> cont_keyword <br /></font><font color="#0000ff" size="2">WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> 19 </font><font color="#0000ff" size="2">FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">)</font><font size="2"> </font></strong></font></p>
<p>But this isn&#8217;t much use as it would just return one string with every keywords joined together. </p>
<p><font face="Courier New" size="2"><strong>ResellerIreland</strong></font> </p>
<p>Modifying our query a little more will allow us to separate our keywords: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font color="#000000" size="2"> </font><font color="#808080" size="2">+</font><font color="#000000" size="2"> Keyword </font><font color="#808080" size="2">+</font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font color="#000000" size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"><font color="#000000"> [text()]<br /></font></font><font color="#0000ff" size="2">FROM</font><font size="2"> cont_keyword </font><font color="#0000ff" size="2">WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> 19<br /></font><font color="#0000ff" size="2">FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">)</font></strong></font>  </p>
<p>I have chosen to surround my keywords with &quot;&#123;&quot; and &quot;&#125;&quot;, this is to allow me to easily search for specific categories in a LIKE statement. If I simply separated them with commas then if there are categories that are similar (for example &quot;Architect&quot;, &quot;Structural Architect&quot;, etc), I would run into problems when constructing my LIKE clause. The query above would give a result looking something like: &#8211; </p>
<p><font face="Courier New" size="2"><strong>&#123;Reseller&#125;,&#123;Ireland&#125;,</strong></font> </p>
<p>Now this is something that we can use&#8230; well almost, you&#8217;ll notice if you run it, the table column is given a random XML name, as is the table the result is presented in. </p>
<p><strong>SIDE NOTE: &#8211; </strong>You may have been tempted to use square brackets instead (&quot;[&quot; and &quot;]&quot;) but we must remember that these are reserved characters in LIKE statements and would have to be escaped in any subsequent queries. </p>
<p>We could use something like: &#8211; <font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</font><font color="#000000" size="2"> </font><font color="#808080" size="2">(</font><font color="#0000ff" size="2">SELECT</font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font color="#000000" size="2"> </font><font color="#808080" size="2">+</font><font color="#000000" size="2"> Keyword </font><font color="#808080" size="2">+</font><font color="#000000" size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font color="#000000" size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"><font color="#000000"> [text()]<br /></font></font><font color="#0000ff" size="2">FROM</font><font size="2"> cont_keyword </font><font color="#0000ff" size="2">WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> 19<br /></font><font color="#0000ff" size="2">FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> keywordlist </font></strong></font>  </p>
<p>If we just need the column to have a legible name, but for our purposes we also need it defined as a table, which is where part of the CROSS APPLY syntax comes in&#8230;</p>
</p>
</p>
</p>
</p>
</p>
</blockquote>
<hr />
<p><font size="2"><strong>Back to the problem</strong></font> </p>
<p>Now we shall use a simple CROSS APPLY join to join our companies table and keywords table-value together. </p>
<blockquote><p><font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</font><font size="2"><font color="#000000"> <br /></font>    cont_companies</font><font color="#808080" size="2">.*,</font><font size="2"> <br /></font><font color="#808080" size="2">    LEFT(</font><font size="2">kw</font><font color="#808080" size="2">.</font><font size="2">keywordlist</font><font color="#808080" size="2">,</font><font size="2"> </font><font color="#ff00ff" size="2">LEN</font><font color="#808080" size="2">(</font><font size="2">kw</font><font color="#808080" size="2">.</font><font size="2">keywordlist</font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#808080" size="2">-</font><font size="2"> 1</font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> keywords<br /></font><font color="#0000ff" size="2">FROM</font><font size="2"><font color="#000000"> <br /></font>    cont_companies <br /></font><font color="#808080" size="2">CROSS</font><font color="#000000" size="2"> </font><font color="#808080" size="2">APPLY<br /></font><font color="#808080" size="2">    (</font><font color="#0000ff" size="2">SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()]<br /></font><font color="#0000ff" size="2">        FROM</font><font size="2"> cont_keyword<br /></font><font color="#0000ff" size="2">        WHERE</font><font size="2"> COMPANYID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID <br /></font><font color="#0000ff" size="2">        FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))</font><font size="2"> kw</font><font color="#808080" size="2">(</font><font size="2">keywordlist</font><font color="#808080" size="2">) </p>
<p></font></strong></font>Now in the code above you will notice a few things, first of, we only select all the columns from the companies table, then we actually take the output from our XML table and trim of the last comma character. The CROSS APPLY join is done based on the CompanyID filed, so we will get a list of keywords for each company. </p></blockquote>
<p>In this sample the keyword output is put into a table called &#8216;kw&#8217;, with the column &#8216;keywordlist&#8217;. &#8216;keywordlist&#8217; contains the full output from the XML query we built above, which includes an additional comma on the end. In our select statement we disregard this because it is not needed, and should not be displayed at anypoint to end users. </p>
<p>We only select all the columns from the companies table, plus the trimmed keywords column, because we are not interested in any of the other data that will be in the &#8216;kw&#8217; temporary table, so why return it. </p>
<p>For my purposes I&#8217;d actually define this query as a view&#8230; you need to watch however, because SQL 2005 Management Studio will tell you that it cannot parse the query if you edit or create this through the designed&#8230; Along with a couple of other features (like &#8216;newsequentialid()&#8217;) the SQL 2005 Management Studio isn&#8217;t able to parse this type of query and will tell you so. </p>
<p>Because the FOR XML clause will only ever return one row an alternative to using the CROSS APPLY join would be to call the FOR XML clause SELECT twice, for example: &#8211; </p>
<blockquote><p><font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font><font color="#000000" size="2"> cont_companies</font><font color="#808080" size="2">.*,</font><font size="2"><font color="#000000"> <br /></font></font><font color="#808080" size="2">    LEFT((<br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()] <br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>FROM</font><font size="2"> cont_keyword <br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID<br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))<br /></font><font color="#808080" size="2">        ,<br /></font><font color="#ff00ff" size="2"><font color="#808080">        </font>LEN</font><font color="#808080" size="2">((<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()]<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>FROM</font><font size="2"> cont_keyword <br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))<br /></font><font color="#808080" size="2">        )</font><font size="2"> </font><font color="#808080" size="2">-</font><font size="2">1 </font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> keywords<br /></font><font color="#0000ff" size="2">FROM</font><font size="2"><font color="#000000"> cont_companies</font> </p>
<p></font></strong></font>Now this will give the same result but would run the FOR XML clause query twice, and if we have several thousand companies with several keywords associated with each, then the overhead of running the FOR XML twice as many times as is needed will soon add up. </p></blockquote>
<p>Using the CROSS APPLY join should therefore be more efficient and easier to manage. </p>
<p><strong>Update: &#8211; 22nd March 2008<br />======================</strong> </p>
<p>On further usage I found that the resulting &quot;keywords&quot; column from both the queries shown above would, on occasion, return the data as binary data. As such they should have a CONVERT statement applied to them in order to correctly return the required data as a TEXT data-type, i.e.: &#8211; </p>
<blockquote><p><font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</font><font size="2"><font color="#000000"> <br /></font>    cont_companies</font><font color="#808080" size="2">.*,</font><font size="2"> <br /></font><font color="#808080" size="2">    CONVERT(<font color="#0000ff" size="2">TEXT, </font><br />    LEFT(</font><font size="2">kw</font><font color="#808080" size="2">.</font><font size="2">keywordlist</font><font color="#808080" size="2">,</font><font size="2"> </font><font color="#ff00ff" size="2">LEN</font><font color="#808080" size="2">(</font><font size="2">kw</font><font color="#808080" size="2">.</font><font size="2">keywordlist</font><font color="#808080" size="2">)</font><font size="2"> </font><font color="#808080" size="2">-</font><font size="2"> 1</font><font color="#808080" size="2">)<font color="#0000ff"><br />    </font>)</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> keywords<br /></font><font color="#0000ff" size="2">FROM</font><font size="2"><font color="#000000"> <br /></font>    cont_companies <br /></font><font color="#808080" size="2">CROSS</font><font color="#000000" size="2"> </font><font color="#808080" size="2">APPLY<br /></font><font color="#808080" size="2">    (</font><font color="#0000ff" size="2">SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()]<br /></font><font color="#0000ff" size="2">        FROM</font><font size="2"> cont_keyword<br /></font><font color="#0000ff" size="2">        WHERE</font><font size="2"> COMPANYID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID <br /></font><font color="#0000ff" size="2">        FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))</font><font size="2"> kw</font><font color="#808080" size="2">(</font><font size="2">keywordlist</font><font color="#808080" size="2">) </font></strong></font></p></blockquote>
<p>or </p>
<blockquote><p><font face="Courier New" size="2"><strong><font color="#0000ff" size="2"></p>
<p>SELECT</p>
<p></font><font color="#000000" size="2"> cont_companies</font><font color="#808080" size="2">.*,</font><font size="2"><font color="#000000"> <br /></font></font><font color="#808080" size="2">    CONVERT(<font color="#0000ff" size="2">TEXT, </font>LEFT((<br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()] <br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>FROM</font><font size="2"> cont_keyword <br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID<br /></font><font color="#0000ff" size="2"><font color="#808080">        </font>FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))<br /></font><font color="#808080" size="2">        ,<br /></font><font color="#ff00ff" size="2"><font color="#808080">        </font>LEN</font><font color="#808080" size="2">((<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>SELECT</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#123;&#8217;</font><font size="2"> </font><font color="#808080" size="2">+</font><font size="2"> Keyword </font><font color="#808080" size="2">+</font><font size="2"> </font><font color="#ff0000" size="2">&#8216;&#125;,&#8217;</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> [text()]<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>FROM</font><font size="2"> cont_keyword <br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>WHERE</font><font size="2"> CompanyID </font><font color="#808080" size="2">=</font><font size="2"> cont_companies</font><font color="#808080" size="2">.</font><font size="2">Company_ID<br /></font><font color="#0000ff" size="2"><font color="#808080">            </font>FOR</font><font size="2"> </font><font color="#0000ff" size="2">XML</font><font size="2"> </font><font color="#0000ff" size="2">PATH</font><font color="#808080" size="2">(</font><font color="#ff0000" size="2">&#8221;</font><font color="#808080" size="2">))<br /></font><font color="#808080" size="2">        )</font><font size="2"> </font><font color="#808080" size="2">-</font><font size="2">1 </font><font color="#808080" size="2">))</font><font size="2"> </font><font color="#0000ff" size="2">AS</font><font size="2"> keywords<br /></font><font color="#0000ff" size="2">FROM</font><font size="2"><font color="#000000"> cont_companies</font> </font></strong></font></p></blockquote>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/developtheweb.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/developtheweb.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/developtheweb.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/developtheweb.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/developtheweb.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=developtheweb.wordpress.com&amp;blog=17269468&amp;post=16&amp;subd=developtheweb&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://developtheweb.wordpress.com/2008/03/18/how-to-showing-a-sub-query-containing-multiple-rows-within-one-column-of-a-select-statement-using-cross-apply-and-sqls-xml-abilities/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/937eec7d0aec964aa982a3ef4c01b494?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">developtheweb</media:title>
		</media:content>

		<media:content url="http://c46.statcounter.com/3733482/0/363c976d/0/" medium="image" />

		<media:content url="http://by1.storage.msn.com/y1pzu-ReAlt65QAvQiZi4jPUUFGuhpP0LxkHrAlVEMurjsnQS7MkRb5-_q7tjxgiGDEL-fkkUXdkSlfMq1UD2P20A?PARTNER=WRITER" medium="image" />
	</item>
	</channel>
</rss>
