TCustomSQLQuery.InternalOpen procedure
Declaration
procedure InternalOpen; overrideDescription
Not described here; this is what TCustomBufDataset.InternalOpen says of it:
Performs actions needed to open the dataset.
InternalOpen is an overridden procedure used to perform actions needed when opening the dataset. InternalOpen implements the abstract method defined in the ancestor class.
InternalOpen uses the FileName property (and the internal data packet reader) to determine if the dataset should be loaded from a file on the local file system. When the internal packet reader has been assigned and FileName is not an empty string (''), the IntLoadFieldDefsFromFile method is called to load the field definitions for the dataset from the specified file name.
InternalOpen compares the sizes for the FieldDefs and Fields properties to determine if the dataset was successfully created from the specified file. If either property has a Count of 0 (zero), DatabaseError is called to raise an exception for the invalid dataset.
Items in the Fields collection are checked to determine if an auto-increment field has been defined for the dataset. An auto-increment field is stored in an internal member used to provide quick access to the next value for the field.
InternalOpen calls the InitDefaultIndexes and InitUserIndexes methods to initialize indexes used by the dataset. When IndexName is not an empty string (''), the indexes for the dataset are searched to locate the value in the property. If a matching index is found, it is assigned to the CurrentIndexDef property for the dataset. If IndexName is not assigned, the IndexFieldNames if examined to determine if the custom index should be built. When IndexFieldNames is not empty, the BuildCustomIndex method is called to create the custom index.
InternalOpen calls the CalcRecordSize method to calculate the value for the RecordSize property. When RecordSize is known, the spare record used in each of the indexes is allocated and initialized. The ParseFilter method is called to parse the value in the Filter property.
To finish opening the dataset, the internal data packet reader for the dataset is used to load record data by calling the IntLoadRecordsFromFile method. No record data is loaded if the internal data packet reader has not been assigned.
InternalOpen is used in the implementation of the InternalRefresh, OpenCursor, and DoInternalOpen methods.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
