Send feedback on this topic.
Teradata.Client.Provider
TdConnection Constructor()
Example 



Teradata.Client.Provider Namespace > TdConnection Class > TdConnection Constructor : TdConnection Constructor()
Initializes a new instance of TdConnection.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New TdConnection()
public TdConnection()
public:
TdConnection();
Remarks
A new instance of TdConnection class is initialized with the following property values:
Property Initial Value
ConnectionString empty string
ConnectionTimeout 20
Database empty string
DataSource empty string
ServerVersion empty string
State System.Data.ConnectionState.Closed
Example
The following example creates a new instance of the TdConnection class, sets the ConnectionString property and opens a connection to the Teradata Vantage Advanced SQL Engine.
public TdConnection CreateConnection()
{
   TdConnection cn = new TdConnection();
    
   cn.ConnectionString = "Data Source=Teradata1;User Id=ca;Password=ca;";
   
   cn.Open();
   
   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
Overload List