Sign in Join
FPDoc Onlineexperiment

TCustomBufDataset.FileName property

Member of TCustomBufDatasetpublishedIn unit BufDataset

File name on the local file system used to load or store the dataset.

Declaration

pascal
property FileName: TFileName read FFileName write FFileName;

Description

FileName is a TFileName property that contains a file name on the local file system used to load and/or store the content for the buffered dataset. FileName can contain optional path information needed to access the file, and must contain a valid file name and extension for the local file system. For example:

ABufDataset.FileName := '/usr/data/sample.bds';
          

or

ABufDataset.FileName := 'c:\usr\data\sample.bds';
          

The value in FileName is used in methods which load and/or save field definitions and record data for the dataset, such as LoadFromFile and SaveToFile. In these methods, FileName is used as the default value for an omitted file name argument in the method(s). FileName is used in the implementation of other methods such as: InternalInitFieldDef, IntLoadFieldDefsFromFile, and InternalOpen.

FileName is also used in the DoBeforeClose method called when the value in the Active property is changed from True to False. In this method, FileName is passed to SaveToFile as an argument prior to exiting from the method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.