Quote Originally Posted by Tom.Net View Post
Follow JMC's advice and also take a look at the command objects executescalar method for returning a single value.
Which is exactly what the first code example, entitled something like "Getting a single value", in my CodeBank thread does.