RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDataSet.Close Method

Closes a dataset.

Pascal
procedure Close;
C++
__fastcall Close();

Call Close to set the Active property of a dataset to false. When Active is false, the dataset is closed; it cannot read or write data and data-aware controls can't use it to fetch data or post edits. 

An application must close the dataset before changing properties that affect the status of the database or the controls that display data in an application. For example, to change the DataSource property for a dataset, the dataset must be closed. Closing the dataset puts it into the dsInactive state. 

 

Active 

DataSource 

State 

AfterClose 

BeforeClose 

Open 

Opening and Closing Datasets 

Posting Data

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!