Gets a string containing the version of the connected SQL Server.
[Visual Basic] Public ReadOnly Property ServerVersion As String [C#] public string ServerVersion {get;} [C++] public: __property String* get_ServerVersion(); [JScript] public function get ServerVersion() : String;
The version of SQL Server currently connected.
Exception Type | Condition |
---|---|
ClosedConError | The connection is closed. |
The following example shows how to create a connection and displays some of its read-only properties.
SQLConnection Class | SQLConnection Members | System.Data.SQL Namespace | Version