Export (0) Print
Expand All

DbConnection.ServerVersion Property

Gets a string that represents the version of the server to which the object is connected.

Namespace:  System.Data.Common
Assembly:  System.Data (in System.Data.dll)

[BrowsableAttribute(false)]
public abstract string ServerVersion { get; }

Property Value

Type: System.String
The version of the database. The format of the string returned depends on the specific type of connection you are using.

ExceptionCondition
InvalidOperationException

ServerVersion was called while the returned Task was not completed and the connection was not opened after a call to OpenAsync.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

XNA Framework

Supported in: 3.0, 2.0, 1.0
Show:
© 2015 Microsoft