Open
procedure Open;
Example
procedure EnsureOpen(const Data: TvxClientDataSet);
begin
if not Data.Active then
Data.Open;
end;
Usage
Open activates the dataset and, for TvxClientDataSet, materialises provider data into its client buffer.
- Opening can execute external SQL/provider work and materialize an unbounded result; constrain the query before opening.
- Do not infer that constraints or change logging protect later script edits in normal
TvxClientDataSetmode—they are explicitly disabled. - Repeated Open while already Active is a no-op through the property equality check.
Additional Technical Info
Open is declared by hidden ancestor TDataSet and is normally used through a visible descendant such as TvxClientDataSet. It is equivalent to assigning Active := True.
Source-backed behaviour
Base TDataSet.Open only sets Active. The modified active setter runs before-open, opens/initializes the descendant cursor and fields/buffers, enters browse state and runs after-open, cleaning up back to inactive on incomplete open.
TvxClientDataSet.SetActive(True) attaches its provider when an SQL connection exists, then uses TCustomClientDataSet to fetch. Its constructor sets FetchOnDemand=False and PacketRecords=-1. After a normal non-edit-mode open it sets LogChanges=False, disables constraints, detaches the provider and closes the owned SQL dataset; the client rows remain in memory.
Related members
Close deactivates and releases buffers. RecordCount describes materialized count.