Gets the current state of the data source connection.
Property Value
One of the System.Data.ConnectionState enumeration values.
The following example creates an instance of TdConnection class, sets the
TdConnection.ConnectionString property and opens a connection to the Teradata Database. It later displays the State property.
public TdConnection CreateTdConnection()
{
TdConnection cn = new TdConnection();
cn.ConnectionString = “Data Source=Teradata1;User ID=ab;Password=ab;”;
cn.Open();
Console.WriteLine(“Connection is {0}”, cn.State);
return cn;
}
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