
'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
Product | Versions | Platforms |
---|---|---|
.NET | 2.1, 3.1, 6 | Windows, Linux, MacOS |
.NET Framework | 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8 | Windows |
.NET Standard | 2.0 | Windows, Linux, MacOS |