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

Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019

See Also

Reference

TdConnection Class
TdConnection Members