UniDAC

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

TUniQuery

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

For example:

  1. For the query where the only allowed value for UpdatingTable property is 'Orders';
  2. For the query where allowed values for UpdatingTable are 'Orders' and 'Order Details'.

In the first case (or on default) editable field is ShipName, in the second - Quantity field.

Example 1.
 SELECT OrderID, ShipName FROM Orders;

Example 2.
 SELECT A.OrderID, A.ShipName, B.Quantity FROM Orders A,
 [Order Details] B WHERE (A.OrderID=B.OrderID); 
© 1997-2024 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback