ODAC

TCustomSmartQuery.Expand Property

Lets all data controls be aware of all the fields belonging to updating table.

Class

TCustomSmartQuery

Syntax

property Expand: boolean default False;

Remarks

Set Expand property to True to let all data controls be aware of all the fields belonging to updating table an not only those requested in the SELECT clause. Those fields which are not requested explicitly will show no data until the dataset enters edit state for a particular record. At that time all fields for that record will be populated from the database.

Preferred design for an application may include DBGrid component which hides unwanted fields and other data components which reveal those fields only for the selected record. This way large tables with lots of fields are edited by the user only on demand during the course of a session. Thus network traffic may be lessened and memory usage lowered for transfers of the requested fields only.

If Expand property is True you can point in a SELECT statement the fields that will be displayed only in the grid. The rest of the fields from the updating table will be fetched before edit.

Note: This property is mutually exclusive with CachedUpdates property. Thus setting Expand to True leaves CachedUpdates property set to False. Also do not try to read blob fields when they are not expanded, this will cause an exception.

The default value is False.

© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback