Specifies, for a specific DataTable, the SQL logic necessary to refresh the rows of a DataTable, showing the changes made to the data source after the UPDATE DATASOURCE statement was executed.
Syntax:
>>--EXEC ADO--.--------------------.TO REFRESH datatable_name-->
+-USING dataset_name-+
>------+-AFTER UPDATE -+------------------------------>
+-AFTER INSERT -+
+-AFTER INSERT OR UPDATE-+
>---.-------------------------------------------------.-------->
| |
| +--------------- , --------------+ |
| V | |
+- MAPPING--datatable_col_name AS table_col_name--+
>--------------USE--sql_refresh_statement--------------------->
>--END-EXEC---><
Parameters:
datatable_name
|
The DataTable to be refreshed.
|
dataset_name
|
The DataSet reference to be used. If you do not specify dataset_name, the current DataSet is used.
|
AFTER
|
The action to the data source, when the UPDATE DATASOURCE statement is executed, that causes a refresh.
|
datatable_col_name
|
The name of a column in a DataTable.
|
table_col_name
|
The name of a column in an SQL table.
|
sql_refresh_statement
|
The SQL SELECT statement that retrieves the columns that need to be refreshed.
|
Example:
EXEC ADO
TO REFRESH Orders USE
SELECT @@IDENTITY as OrderID
END-EXEC
Comments:
The SQL logic must reference actual tables and columns in the data source that needs to be refreshed.
The SQL logic can refer to column values for the row that has been deleted in the DataTable by using the column name enclosed in braces, optionally followed by the type of value (CURRENT, ORIGINAL, DEFAULT, or PROPOSED), separated by a period. For example, {OrderId} or {OrderID.Original}.