From RAD Studio API Documentation
Jump to: navigation, search


property AutoClose: Boolean read GetAutoClose write SetAutoClose


__property bool AutoClose = {read=GetAutoClose, write=SetAutoClose, stored=IsACS, default=1};


Type Visibility Source Unit Parent
property published
FireDAC.Stan.Option TFDFetchOptions


Controls the automatic closing of a dataset cursor after fetching the last record.

Use the AutoClose property value to control the automatic closing of a dataset cursor.  If AutoClose is set to True and the last record is fetched from the current result set, then the underlying cursor is closed, all additional result sets that have not been yet processed are discarded, and the resources associated with the cursors are released. The dataset (TFDDataSet descendant) itself is closed, but its internal command object is closed. This allows the release of DBMS resources associated with a cursor as fast as possible. 

If your SQL command returns several result sets and you need to process all of them, then you must set AutoClose to False. Otherwise, after processing the first result set, all other result sets are discarded. 

The default value is True.

See Also