FileName property

Applies to
TQDB, TQDBItem, TQDBView

Declaration
property FileName : TQDBFileName;

Description
The FileName property contains the name of the physical QDB file. FileName is either empty (i.e. ''), in which case there is no open QDB file, or refers to the current open QDB file. The default extension is 'QDB'. If the ExpandedFileNames property is true (the default) a new FileName is expanded to its fully qualified form and stored that way. Otherwise the FileName refers to the current directory, increasing flexibility but also the risk of referring to the wrong QDB file.

Setting FileName opens or closes the QDB file. If FileName is cleared (i.e., set to '') the file currently open is closed. If a non-null value is assigned there are two possible outcomes.

   if FileName refers to an existing QDB file, the file is opened and readied for use.

   if FileName does not refer to an existing file, a new QDB file is created and readied for use.

If SaveOnClose is true, closing a QDB file also saves any changes that have been made. Otherwise when FileName is changed any changes made the open QDB file will be lost.

FileName is also changed implicitly by the SaveAs method.