Export (0) Print
Expand All

Application.GetServerInfo Method

Returns the SQL Server version number of the SQL Server product installed on the target server. 

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

'Declaration
Public Sub GetServerInfo ( _
	server As String, _
	<OutAttribute> ByRef serverVersion As String _
)
'Usage
Dim instance As Application 
Dim server As String 
Dim serverVersion As String

instance.GetServerInfo(server, serverVersion)

Parameters

server
Type: String
The name of the server hardware to check for the SQL Server product version.
serverVersion
Type: String
The version number of the SQL Server product, defined as an out parameter.

The default value of this property is 9.

The following example retrieves the SQL Server version number from the specified server.

Sub Main(ByVal args() As String)
    Dim app As Application =  New Application() 
    Dim outParam As String
    app.GetServerInfo("yourserver", out outParam)
    Console.WriteLine("Server version? " + outParam)
End Sub

Community Additions

Show:
© 2015 Microsoft