Send feedback on this topic.
Teradata.Client.Provider
TdCommand Class
Members 



Teradata.Client.Provider Namespace : TdCommand Class
TdCommand class represents a SQL request. The request can be either a Single SQL statement or Multi-Statement SQL.
Object Model
TdCommand ClassTdConnection ClassTdParameter ClassTdDataReader ClassTdDataReader ClassTdParameterCollection ClassTdParameter ClassTdTransaction Class
Syntax
Remarks

TdCommand features the following methods used to execute commands synchronously:

Method Description
TdCommand.ExecuteReader Executes commands that return rows.
TdCommand.ExecuteNonQuery Executes commands that do not return rows such as UPDATE, INSERT, DELETE, and all DDL statements
TdCommand.ExecuteScalar Executes commands that only returns one value.
TdCommand.ExecuteCreateProcedure Must be used when executing a "CREATE PROCEDURE" statement.

TdCommand also supports the asynchronous execution of a command. When one of the methods that supports asynchronous execution is used, it's corresponding "End" method must be called to end the execution. The following methods support asynchronous execution:

Method Description
TdCommand.BeginExecuteReader Asynchronously executes commands that return rows. The corresponding TdCommand.EndExecuteReader method must be called to end the execution
TdCommand.BeginExecuteNonQuery Asynchronously executes commands that do not return rows such as UPDATE, INSERT, DELETE, and all DDL statements. The corresponding TdCommand.EndExecuteNonQuery must be called to end the execution
TdCommand.ExecuteNonQueryAsync A Task-based asynchronous version of the TdCommand.ExecuteNonQuery method. Executes a SQL statement and returns the number of rows affected.
TdCommand.ExecuteReaderAsync A Task-based asynchronous version of the TdCommand.ExecuteReader method. Executes a SQL statement and returns a TdDataReader object..
TdCommand.ExecuteScalarAsync A Task-based asynchronous version of the TdCommand.ExecuteScalar method. Executes the SQL statement and returns the first column of the first row.

For information on how to use LOBs in a command please refer to TdParameter.Value.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Data.Common.DbCommand
            Teradata.Client.Provider.TdCommand

Requirements

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

See Also

Reference

TdCommand Members
Teradata.Client.Provider Namespace