Previous Topic Next topic Print topic


DELETE (SEARCHED)

Removes the DataRows that meet the row state and/or search criteria from the named DataTable.

Syntax:

>>--EXEC ADO--.-------------------.---DELETE---FROM------->
              +-USING dataset_name+  

>--datatable_name--.------------------------------------.—>
                   +-FOR-.-ADDED-------------.-DATAROWS-+
                         +-CURRENT-----------+
                         +-DELETED-----------+
                         +-MODIFIED CURRENT--+
                         +-MODIFIED ORIGINAL-+
                         +-ORIGINAL----------+
                         +-UNCHANGED---------+           

>----.-------------------------.----------------END-EXEC--><
     +-WHERE search_conditions-+

Parameters:

dataset_name The DataSet reference to be used. If you do not specify dataset_name, the current DataSet is used.
datatable_name The target DataTable for the delete operation.
search_conditions Any valid expression that can follow the standard SQL WHERE clause.

Comment:

If no criteria are specified, then all of the DataRows in the named DataTable are removed.

Example:

     EXEC ADO
        DELETE FROM Customers
        WHERE CustomerID = 'ZZZZ1'
     END-EXEC
Previous Topic Next topic Print topic