EPUB | CHM | PDF

TMySQLTable.Properties.ReopenOnIndexChange

Top Previous Next

note Since v2.7.2

Enables or disables client-side dataset sorting after switching to another index.

Syntax:

property ReopenOnIndexChange: Boolean default True;

Description:

You can switch dataset to another index by using IndexName or IndexFieldNames properties. ReopenOnIndexChange property value controls whether dataset will be re-fetched from server or just resorted locally.

ReopenOnIndexChange property value

TMySQLTable behavior

True (default behavior)

Dataset is closed and whole resultset is re-queried from server again sorted according to selected index. This method is slower but you'll have fresh resultset with all changes on server side included. Sorting performed on server side respecting current character set and collation.

False

Dataset is not closed and current data is just re-ordered according to selected index using client-side sorting. This method is usually faster then first since there is no need to query data from server each time index is switched. This is the same action as calling SortBy method providing field names index is built on. But your data will be not updated with latest server-side changes. This is the same data fetched when opening dataset, it is just resorted in other order.

See also: IndexName, IndexFieldNames properties, SortBy method