Send feedback on this topic.
Teradata.Client.Provider
GetDeleteCommand() Method



Teradata.Client.Provider Namespace > TdCommandBuilder Class > GetDeleteCommand Method : GetDeleteCommand() Method
Gets the TdCommand object with the required CommandText and Parameters properties to delete a row from a Teradata table.
Syntax
'Declaration
 
Public Overloads Shadows Function GetDeleteCommand() As TdCommand
'Usage
 
Dim instance As TdCommandBuilder
Dim value As TdCommand
 
value = instance.GetDeleteCommand()
public new TdCommand GetDeleteCommand()
public:
new TdCommand^ GetDeleteCommand(); 

Return Value

A TdCommand object with required CommandText property and Parameters collection properly set for a delete operation.
Exceptions
ExceptionDescription
The DataAdapter property is not set, SelectCommand of the associated TdDataAdapter is not set or there is no TdConnection associated with DataAdapter.SelectCommand.
The TdCommandBuilder is closed / disposed.
Remarks

The invocation of the GetDeleteCommand method can result in one or more calls to the Advanced SQL Engine to retrieve metadata (Column and Table information). The metadata is cached in order to minimize roundtrips to the Advanced SQL Engine. The cache is purged only when the DataAdapter property is set or the Refresh method is called

The TdCommand object returned will contain the DELETE statement required to delete a row from the table specified in DataAdapter.SelectCommand.CommandText property. The DataAdapter.SelectCommand.CommandText must be a single table SELECT statement. The TdCommandBuilder cannot generate a DELETE statement for a SELECT statement that contains implicit or explicit Joins.

Requirements

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

See Also

Reference

TdCommandBuilder Class
TdCommandBuilder Members
Overload List