New ID for record in SQL Server

In a recent technical mentoring session that we hosted, a question came up that crops up regularly, so I thought I’d post a quick summary here.

The question is “How do I retrieve the id of a newly created record in a SQL Server table from my application?”

For this example, we’ll assume that the table in question is called tutor, and has just two fields, id and name, where the id field is a primary key with an identity field. The table definition would be

CREATE TABLE tutor (id INT PRIMARY KEY IDENTITY(1,1), full_name VARCHAR(100) NOT NULL)

Firstly I’d like to warn against the common use (miss-use) of a well known system variable called @@IDENTITY. This variable gets back the value of the most recently updated identity field, which on the face of it seems perfect. However, there are two key things to watch.

Continue reading ‘New ID for record in SQL Server’ »

Tugs not tankers

The other day I was watching some tug boats help manoeuvre a large tanker in to port. Despite the huge size of the tanker, the small tugs made swift work of such a difficult task. This got me thinking again about one of my pet subjects, which is why large companies all too often insist on getting similarly sized companies to solve some of their smaller software issues. If the captain of a tanker needs a quick change in direction, he doesn’t ask for another tanker to help with the manoeuvre.

Continue reading ‘Tugs not tankers’ »

Green Action in IT

We have always taken the Green side of life very seriously. At first glance one might not think that there is a great deal that can be achieved by an IT Consultancy such as ours to help the environment; or at least to reduce the impact of our actions on the environment. But, as time has passed I keep bumping into useful things - it seems to be in the zeit-geist more and more. The video below is taken from the Reuters website and talks about what companies are doing and in particular what products are selling at CeBIT 2008.

Continue reading ‘Green Action in IT’ »

Using Wordpress

For those of you in the know, if you look carefully you may have realised that we use Wordpress to build and manage our website. Website content management is something that is very close to my heart, as I’ve designed and built a corporate content management system (CMS) and helped to build many websites that use its functionality. That particular sledgehammer would not be suitable for manging the little nut, that is our website, so Wordpress turned out to be a real asset in building the site.

Continue reading ‘Using Wordpress’ »

SEO - Search Engine Optimisation

Search Engine Optimisation is often miss-understood — placed on a pedestal and either feared or revered by those who need it.

I’ve been working on optimising the Colosa website. I’ve just started this process and our website has only just launched, so it will be interesting to see how things change over the next few months. What does it mean to optimise a website? Many people will tell you that this is a black art. The truth is rather more straight forward.

Continue reading ‘SEO - Search Engine Optimisation’ »

NeoOffice Quickstarter

I’ve been using OpenOffice for years under Windows now and StarOffice before that, even on Solaris - might be more than 10 years? Recently my laptop died and I decided to get a new one and although I haven’t had an Apple Mac for about 8 years I decided to buy a Mac as now they run on Intel chips, I can run Windows on it - plus they look and feel great and I like the fact there is a Unix base under OSX. I thought that I would move to using NeoOffice (an OpenOffice derivative for the Mac with native look and feel) and soak up the Mac ethos by using all of their short cuts etc. All is great, but NeoOffice is very slow to start: in excess of 10 seconds after I start the machine and login.

Continue reading ‘NeoOffice Quickstarter’ »

VOIP is still immature

It’s interesting how VOIP is such a hot topic and yet how immature it is in terms of the slickness of its configuration. Many years ago setting up broadband connectivity at home with a fixed IP and an associated domain or domains, a firewall, NAT, DHCP, ADSL, PPP, etc. was a task for the dedicated systems administrator. Now you can buy a box with all of that built in for only a few pounds, indeed most broadband suppliers give them away to their new customers. And, configuration is easy: user-name, password and your providers domain - and all of the other settings are either handed off or have sensible defaults pre-set in the device. VOIP is not like this at all - yet. In a couple of years we’ll all be buying our ADSL wireless routers with our phone and configuration for VOIP will be as simple as ADSL is now.

Continue reading ‘VOIP is still immature’ »

The Colrosa Blog

This is the first post of the Colrosa blog and we thought that it would be a good idea to let you know what to expect from the blog.

Continue reading ‘The Colrosa Blog’ »