Send feedback on this topic.
Teradata.Client.Provider
TdError Class
Members  Example 



Teradata.Client.Provider Namespace : TdError Class
Represents a warning or error returned by the Advanced SQL Engine, the .Net Data Provider for Teradata or TeraGSS.
Syntax
'Declaration
 
Public NotInheritable Class TdError 
'Usage
 
Dim instance As TdError
public sealed class TdError 
public ref class TdError sealed 
Remarks
The data provider returns errors and warnings using TdError class.

TdException class encapsulates one or more instances of the TdError class.

Warnings are not exceptions and therefore are reported using TdConnection.InfoMessage event.

Example
public TdConnection OpenConnection(String connectionString)
{
    try
    {
        TdConnection cn = new TdConnection(connectionString);
        cn.Open();
        
        return cn;
    }
    catch(TdException e)
    {
        for (int index = 0; index < e.Errors.Count; index++)
        {
            Console.WriteLine(“ERROR: {0} ({1})”, e.Errors[0].Message,
                                                  e.Errors[0].Number);
        }
        
        throw;
    }
    
    return null;
}
Inheritance Hierarchy

System.Object
   Teradata.Client.Provider.TdError

Requirements

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

See Also

Reference

TdError Members
Teradata.Client.Provider Namespace
Error Messages