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



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

Return Value

Returns a TdCommand object with required CommandText property and parameters collection properly set for a update operation.
Exceptions
ExceptionDescription
The DataAdapter property is not set, SelectCommand of the associated TdDataAdapter is not set or No TdConnection is associated with DataAdapter.SelectCommand.
The TdCommandBuilder is closed / disposed.
Remarks

The invocation of GetUpdateCommand method can result in one or more calls to Teradata Database 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 UPDATE statement required to update a row in the table specified in DataAdapter.SelectCommand.CommandText property. The DataAdapter.SelectCommand.CommandText must be a single table SELECT statement. The TdCommandBuilder cannot generate an UPDATE statement for a SELECT statement that contains implicit or explicit joins.

Requirements
ProductVersionsPlatforms
.NET2.1, 3.1, 6Windows, Linux, MacOS
.NET Framework4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8Windows
.NET Standard2.0Windows, Linux, MacOS
See Also

Reference

TdCommandBuilder Class
TdCommandBuilder Members
Overload List