OdbcConnection.ServerVersion Property

Definition

Gets a string that contains the version of the server to which the client is connected.

C#
[System.ComponentModel.Browsable(false)]
public override string ServerVersion { get; }
C#
[System.ComponentModel.Browsable(false)]
public string ServerVersion { get; }

Property Value

The version of the connected server.

Attributes

Exceptions

The connection is closed.

Remarks

If ServerVersion is not supported by the underlying ODBC driver, an empty string ("") is returned.

The ServerVersion property takes the form '##.##.####,' where the first two digits are the major version, the next two digits are the minor version, and the last four digits are the release version. The driver must render the product version in this form but can also append the product-specific version as a string (for example, "04.01.0000 Rdb 4.1"). This string takes the form 'major.minor.build' where major and minor are exactly two digits and build is exactly four digits.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7 (package-provided), 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided)

See also