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

<channel>
	<title>Infobox Media Web Blog &#187; Code Snippets</title>
	<atom:link href="http://www.infoboxmedia.co.uk/blog/index.php/category/code-snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.infoboxmedia.co.uk/blog</link>
	<description>Website design and marketing news, hints and tips</description>
	<lastBuildDate>Mon, 06 Jun 2011 12:27:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL &#8211; update records in one table based on values in another</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2010/04/29/sql-update-records-in-one-table-based-on-values-in-another/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2010/04/29/sql-update-records-in-one-table-based-on-values-in-another/#comments</comments>
		<pubDate>Thu, 29 Apr 2010 15:21:24 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=125</guid>
		<description><![CDATA[After messing around for a while to figure out a way to do this, eventually I figured it out using the EXISTS clause.
Here is an example : 
UPDATE tbl1
SET tbl1_field =	( SELECT tbl1_field
FROM tbl1
WHERE tbl.tbl1_id = tbl2.tbl2_id)
WHERE EXISTS
  ( SELECT tbl1_field
    FROM tbl1
    WHERE tbl.tbl1_id = tbl2.tbl2_id);
SQL &#8211; [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2010/04/29/sql-update-records-in-one-table-based-on-values-in-another/">SQL &#8211; update records in one table based on values in another</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2010/04/29/sql-update-records-in-one-table-based-on-values-in-another/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Connecting to a named instance of SQL remotely</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2010/02/26/connecting-to-a-named-instance-of-sql-remotely/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2010/02/26/connecting-to-a-named-instance-of-sql-remotely/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 19:47:36 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[management studio]]></category>
		<category><![CDATA[multiple instances]]></category>
		<category><![CDATA[named instances]]></category>
		<category><![CDATA[port 1433]]></category>
		<category><![CDATA[server name]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[tcp/ip]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=99</guid>
		<description><![CDATA[I got stuck for about a day and half with this.
A client had a server with two instances of  SQL installed &#8211; the default being SQL 2000 and the named instance being SQL2005. I needed to connect through SQL Management Studio remotely.
The default configuration was that the SQL2005 instance was using dynamic ports &#8211; [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2010/02/26/connecting-to-a-named-instance-of-sql-remotely/">Connecting to a named instance of SQL remotely</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2010/02/26/connecting-to-a-named-instance-of-sql-remotely/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Generating a random number (integer) in ASP.NET</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/16/generating-a-random-number-integer-in-asp-net/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/16/generating-a-random-number-integer-in-asp-net/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 18:53:38 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[random number]]></category>
		<category><![CDATA[random number generator]]></category>
		<category><![CDATA[random position]]></category>
		<category><![CDATA[vbscript]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=80</guid>
		<description><![CDATA[For one of my sites (Eeliz.com) I needed to randomly position an image either left or right. For this I used the following random number function : 
Public Function RandomNum(ByVal MaxNum As Integer, _
    Optional ByVal MinNum As Integer = 0) As Integer
      &#8216;initialise the number generator
 [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2010/01/16/generating-a-random-number-integer-in-asp-net/">Generating a random number (integer) in ASP.NET</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/16/generating-a-random-number-integer-in-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring 3D Vista &#8211; IIS7</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/15/configuring-3d-vista-iis7/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/15/configuring-3d-vista-iis7/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 08:16:22 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[.bra]]></category>
		<category><![CDATA[360 tour]]></category>
		<category><![CDATA[3dvista]]></category>
		<category><![CDATA[error loading skin]]></category>
		<category><![CDATA[iis 7]]></category>
		<category><![CDATA[mime types]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=78</guid>
		<description><![CDATA[When we upgraded our servers we moved to IIS 7. For sites which incorporated 3D Vista 360 degree tours this caused a bit of an issue&#8230;To get the movie to play certain MIME types need to be configured &#8211; and this is how 3D Vista advise on their site : 
1 &#8211; Go to Start [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2010/01/15/configuring-3d-vista-iis7/">Configuring 3D Vista &#8211; IIS7</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2010/01/15/configuring-3d-vista-iis7/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Javascript replace</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/09/javascript-replace/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/09/javascript-replace/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 13:37:04 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[.replace]]></category>
		<category><![CDATA[global replace]]></category>
		<category><![CDATA[javascript replace]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=57</guid>
		<description><![CDATA[Another quick snippet. I was using the Javascript replace method in my site when I noticed that by default it only made a singular replace. So I hunted down the solution for a global replace&#8230;
MyString.replace(/oldtext/gi, &#8220;newtext&#8221;)
Javascript replace is a post from: Infobox Media Web Blog
<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2009/12/09/javascript-replace/">Javascript replace</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/09/javascript-replace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Random order in SQL</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/03/random-order-in-sql/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/03/random-order-in-sql/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:34:07 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=46</guid>
		<description><![CDATA[Another quick code snippet I found pretty useful this week. In a SQL command you can use &#8220;ORDER BY NEWID()&#8221; to randomly order your results.
This can be implemented in a number of ways &#8211; to randomly display advertising features, news items or any other set of records or you can use &#8220;SELECT TOP 1 ID [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2009/12/03/random-order-in-sql/">Random order in SQL</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2009/12/03/random-order-in-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helicon root redirect</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/30/helicon-root-redirect/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/30/helicon-root-redirect/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 15:38:07 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[helicon]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=43</guid>
		<description><![CDATA[Another quick issue&#8230;I needed to use Helicon 3.x to redirect the root of a website to a subfolder&#8230;
Here is the code
RewriteBase
RewriteCond %{HTTP_HOST} ^(?:www\.)?mywebsite\.com$ [NC]
RewriteRule ^/?$ http://www.mywebsite.com/myfolder [R=301,L] 
Helicon root redirect is a post from: Infobox Media Web Blog
<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2009/11/30/helicon-root-redirect/">Helicon root redirect</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/30/helicon-root-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using devExpress Text Box as a hidden field</title>
		<link>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/28/using-devexpress-text-box-as-a-hidden-field/</link>
		<comments>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/28/using-devexpress-text-box-as-a-hidden-field/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 18:49:17 +0000</pubDate>
		<dc:creator>Len</dc:creator>
				<category><![CDATA[Code Snippets]]></category>

		<guid isPermaLink="false">http://www.infoboxmedia.co.uk/blog/?p=19</guid>
		<description><![CDATA[I use the devExpress controls in a range of my websites. Tonight I was having a problem implementing an ASPxTextBox as a hidden field&#8230;the normal hidden field was no good as I am inside an ASPxCallbackPanel and I was losing the value.

Basically, my problem was that my ASPxTextBox was working fine, but as soon as [...]<p><a href="http://www.infoboxmedia.co.uk/blog/index.php/2009/11/28/using-devexpress-text-box-as-a-hidden-field/">Using devExpress Text Box as a hidden field</a> is a post from: <a href="http://www.infoboxmedia.co.uk/blog">Infobox Media Web Blog</a></p>
]]></description>
		<wfw:commentRss>http://www.infoboxmedia.co.uk/blog/index.php/2009/11/28/using-devexpress-text-box-as-a-hidden-field/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

