Looking for the simplest way to get a single value from a database. This gets confusing when you consider all of the 9,000 ways that exist to do this in a .NET language. SqlCommands, DataReaders, Recordsets… oh my!
Assume I already have a connection to the DB opened. I simply want to do something like this:
Dim age As Integer = <SQL statement here>
Not a VB.Net guy, but I think it would look something like this in VB.Net: