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 followiing properties 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 database.
public TdConnection CreateConnection()
{
   TdConnection cn = new TdConnection();
    
   cn.ConnectionString = "Data Source=Teradata1;User Id=ca;Password=ca;";
   
   cn.Open();
   
   return cn;
}
Requirements

Target Platforms: Windows 7, Windows 8, Windows 8.1, Windows 10, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

See Also

Reference

TdConnection Class
TdConnection Members
Overload List