RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAdoDbxDataAdapter.DeleteCommand Property

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

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

Use this property to store a SQL DELETE statement that you intend to pass to the TAdoDbxDataAdapter multiple times. This property serves as a shorthand method for storing and calling a command that you intend to use multiple times. 

When you assign DeleteCommand to a previously created TAdoDbxCommand, the TAdoDbxCommand is not cloned. The DeleteCommand maintains a reference to the previously created TAdoDbxCommand object.

Note: During Update, if you don't set this property and primary key information is present in the DataSet, you can generate the DeleteCommand automatically by setting the SelectCommand property and using the TAdoDbxCommandBuilder. Additional commands that you do not set are generated by the TAdoDbxCommandBuilder. This generation logic requires key column information to be present in the DataSet. For more information, see the Microsoft .NET SDK online help.
 

 

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