
'Declaration Public NotInheritable Class TdCommand Inherits System.Data.Common.DbCommand Implements System.ComponentModel.IComponent, System.Data.IDbCommand, System.ICloneable, System.IDisposable
'Usage Dim instance As TdCommand
public sealed class TdCommand : System.Data.Common.DbCommand, System.ComponentModel.IComponent, System.Data.IDbCommand, System.ICloneable, System.IDisposable
public ref class TdCommand sealed : public System.Data.Common.DbCommand, System.ComponentModel.IComponent, System.Data.IDbCommand, System.ICloneable, System.IDisposable
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.
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Data.Common.DbCommand
Teradata.Client.Provider.TdCommand
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019