I need to determine the version of SQL Server (2000, 2005 or 2008 in this particular case) that a connection string connects a C# console application (.NET 2.0). Can anyone provide any guidance on this?
Thanks, MagicAndi
Update
I would like to be able to determine the SQL Server version form the ADO.NET connection object if possible.
This code will determine the version of SQL Server database being used – 2000, 2005 or 2008:
The code below will do the same, this time using NinthSense’s answer: