RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAdoDbxDataAdapter.UpdateCommand Property

A TAdoDbxCommand used during Update to update records in the data source that correspond to modified rows in the DataSet.

Pascal
property UpdateCommand: TAdoDbxCommand;
C++
__property TAdoDbxCommand UpdateCommand;

Use this property to get or set the SQL UPDATE statement. You can use this property as a form of shorthand to define a SQL UPDATE statement that you intend to use multiple times.  

When UpdateCommand is assigned to a previously created TAdoDbxCommand, the TAdoDbxCommand is not cloned. The UpdateCommand maintains a reference to the previously created TAdoDbxCommand object. If execution of this command returns rows, these rows can be merged with the DataSet depending on how you set the UpdatedRowSource property of the TAdoDbxCommand object.

Note: During Update, if you don't set this property and primary key information is present in the DataSet, the UpdateCommand can be generated automatically if you set the SelectCommand property and use the TAdoDbxCommandBuilder. Then, any additional commands that you don't set are generated by the TAdoDbxCommandBuilder. This generation logic requires key column information to be present in the DataSet.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!