System.Data.SqlClient Namespace SqlConnection Class
Returns a string containing the version of the of the server to which the client is connected.
Script |
[ string variable = ] SqlConnection.ServerVersion |
variable |
Returns the version of the connected server. |
The property is read only with no default value.
The string representation of the version is of the form major.minor.build ( ##.##.#### ), where the first two digits are the major version, the next two digits are the minor version, and the last four digits are thr build or release version.
The following example shows the simplest way to retrieve and display the Provider property of the current connection.
"Provider: " + myConn.Provider;
"Provider: " + myConn.Provider |
|
C# |
VB |
Show me
SqlConnection Members