Send feedback on this topic.
Teradata.Client.Provider
ServerVersion Property
Example 



Teradata.Client.Provider Namespace > TdConnection Class : ServerVersion Property
Gets the Teradata server version after a connection is established.
Syntax
'Declaration
 
Public Overrides NotOverridable ReadOnly Property ServerVersion As String
'Usage
 
Dim instance As TdConnection
Dim value As String
 
value = instance.ServerVersion
public override string ServerVersion {get;}
public:
property String^ ServerVersion {
   String^ get() override;
}

Property Value

The Teradata server version (e.g. 06.00.00.00).
Exceptions
ExceptionDescription
TdConnection is not in the open state.
Remarks
This property returns the Teradata server version when a TdConnection is in an open state. Otherwise it will return an empty string.
Example
The following example creates an instance of TdConnection class, sets the TdConnection.ConnectionString property and opens a connection to the Advanced SQL Engine. It later displays the ServerVersion property.

public TdConnection CreateTdConnection()
{
   TdConnection cn = new TdConnection();
            
   cn.ConnectionString = “Data Source=Teradata1;User ID=ab;Password=ab;”;
            
   cn.Open();
            
   Console.WriteLine(“Teradata server version: {0}”, cn.ServerVersion);
            
   return cn;
}
Requirements
ProductVersionsPlatforms
.NET6, 7Windows, Linux, MacOS
.NET Framework4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdConnection Class
TdConnection Members