iTunes on Windows

I’m no fan of iTunes, but this phrase is brilliant:

“It’s like giving a glass of ice water to somebody in hell”

- Steve Jobs on why Windows users love iTunes’ jukebox software so much.

[Via Ben Casnocha]

Using the CLR in SQL Server 2005

I’m using SQL Server 2005 on current project, and started looking at the new CLR support, where .net code can be directly loaded into SQL server.

This has already been mentioned on plenty of other blogs, but I figured I’ll repost here for my own reference.  To enable the CLR for a database, you need to the run the following:

sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO

To create a simple stored procedure to return the values from multiple tables, use SqlContext.Pipe, as follows:

public partial class StoredProcedures
{
	[SqlProcedure]
	public static void GetItemById(int id)
	{
		StringBuilder SqlStatement = new StringBuilder();

		// Get the tables
		SqlStatement.AppendLine("SELECT * FROM ItemHeader WHERE (ItemHeaderId = " + id + ")";
		SqlStatement.AppendLine("SELECT * FROM ItemDetail WHERE (ItemHeaderId = " + id + ")";

		// Send the the command output to the client
		using (SqlConnection conn = new SqlConnection("context connection=true"))
		{
			using (SqlCommand command = conn.CreateCommand())
			{
				conn.Open();
				command.CommandText = SqlStatement.ToString();
				SqlContext.Pipe.ExecuteAndSend(command);
				conn.Close();
			}
		}
	}
}

You could easily achieve the same thing with T-SQL, but it’s a good way to get started with the CLR, though there might be a small performance overhead (though in this case, I would imagine it’s minimal).

Web collaboration with Yugma

Had an online conference today, and used Yugma for desktop sharing and collaboration. It’s the first time I’ve used it, but it’s an impressive tool, and completely free for the basic version.

It’s got desktop sharing with chat and annotation tools. There’s no VOIP functionality, so we used Skype instead.  The combination worked well and was very effective.

There’s a [slightly] more complete review on CenterNetworks.  If you’re looking for an online collaboration tool, this is worth checking out. I’ll definitely be using it again!

Remote Desktop Manager

If you have a need to connect to various servers using Remote Desktop, and are anything like me, your desktop will probably be cluttered with numerous remote desktop shortcuts to connect to these machines, which can get quite unecessary mess.

Fortunately, there’s help at hand.  Came across this open source tool which helps keep them more organised, RemoteDesktopManager by Daniel Knippers. It allows grouping of connections, and existing connections can be imported by simply dragging and dropping them over the main window (though you’ll need to manually choose which group they belong to).

Remotedesktopmanager

The password can’t be set from within the application due to the way Microsoft stores these, so if you need to do this, you’ll need to create the connection from the standard Remote Desktop application with the password and ‘Save password’ option checked, save the file, and then import it into RDM by dragging it over the main window.

Florida to London

Found this amusing…

Florida to London

Cheaper than flying I guess…