PgDAC

TPgQuery.UpdatingTable Property

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.

Class

TPgQuery

Syntax

property UpdatingTable: string;

Remarks

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 TCustomPgDataSet.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.

Example

Below are two examples for the query, where:

  1. the only allowed value for UpdatingTable property is 'Dept';
  2. allowed values for UpdatingTable are 'Dept' and 'Emp'.

In the first case (or by default) editable field is ShipName, in the second - all fields from Emp.

1)Example 1.
   SELECT * FROM Dept

2) Example 2.
    SELECT * FROM Dept, Emp
      WHERE Dept.DeptNo = Emp.DeptNo 
© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback