Previous Topic Next topic Print topic


PREPARE TO UPDATE

Begins the process of updating a data source with changes made in the DataTables of a DataSet.

Syntax:

                                                      +--    ,   --+
                                                      V            | 
>>--EXEC ADO-.--------------------.-PREPARE TO UPDATE-datatable_name-->
             +-USING dataset_name-+  
 >--END-EXEC---><

Parameters:

datatable_name The DataTables whose changes are prepared to be placed in the data source.
dataset_name The DataSet reference to be used. If you do not specify dataset_name, the current DataSet is used.

Comments:

After specifying the DataTables whose changes will be loaded to the data source, TO INSERT, TO DELETE and TO UPDATE statements are used to specify for each DataTable how those changes are placed back in the data source. The UPDATE statement completes the process.

If no TO INSERT, TO DELETE or TO UPDATE statements are specified, OpenESQL will generate these statements based on the SQL construct used in the TO FILL statement.

Example:

     EXEC ADO
        PREPARE TO UPDATE Customers, Orders, "Order Details"
     END-EXEC
Previous Topic Next topic Print topic