Alex Rivera | Logout

Determine version of SQL Server from ADO.NET

Asked 2009-06-04T10:58:38.460
15

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.

Edit
Report

1 Answer

2

The Server version is also available as a (string) property on the Connection object and as a SqlVersion property on the ServerConnection.

And SQl2008 is version >= 10

answered 2009-06-04T11:11:10.150

Your Answer