Used to specify which table in a query is assumed to be the target for subsequent data-modification queries as a result of user incentive to insert, update or delete records.
property UpdatingTable: string;
Use the UpdatingTable property to specify which table in a query is assumed to be the target for the subsequent data-modification queries as a result of user incentive to insert, update or delete records.
This property is used on Insert, Update, Delete or RefreshRecord (see also TCustomMyDataSet.Options) if appropriate SQL (SQLInsert, SQLUpdate or SQLDelete) is not provided.
If UpdatingTable is not set then the first table used in a query is assumed to be the target.
All fields from other than target table have their ReadOnly properties set to True (if TCustomMyDataSet.Options )
The first example specifies a query in which only one value 'Dept' for the UpdatingTable property is allowed.
The second example shows a query in which allowed values for UpdatingTable are 'Dept' and 'Emp'.
By default the updating table will be the first used table, so 'DEPT' and all fields of DEPT will be editable. If however UpdatingTable is set to be 'EMP' all fields of EMP will be editable.
Example 1. SELECT * FROM Dept Example 2. SELECT * FROM Dept, Emp WHERE Dept.DeptNo = Emp.DeptNo