Rico napisal(a):
Hello,
I have an application which I'd like to determine if SQL Server is
installed, and if so, what version. Is there any way to do this outside of
error trapping?
Thanks!
Rick
Hi, i use this code to check about running instances, which can also
provide information about version. I know it's not 100% what you
looking for, but perhaps will be useful:
Imports System.Data.Sql
Public class test
Private _list_inst As SqlDataSourceEnumerator
Public Property list_inst() As SqlDataSourceEnumerator
Get
Return _list_inst
End Get
Set(ByVal value As SqlDataSourceEnumerator)
_list_inst = value
End Set
End Property
Private Function listservers() As DataTable
list_inst = Sql.SqlDataSourceEnumerator.Instance
Return list_inst.GetDataSources
End Function
end class
Function listservers return datatable with current installed and
running (!) instances. There is column called version.
Greeting
PK