RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TCustomCachedDataSet.LoadFromFile Method

Loads the dataset's data from a file.

Pascal
procedure LoadFromFile(const AFileName: string = '');
C++
__fastcall LoadFromFile(const AnsiString AFileName = '');

Call LoadFromFile to populate the Data property with data stored in an external file. FileName is the name of the file containing the data to load. If the FileName parameter is an empty string, or if this parameter is omitted (Delphi), LoadFromFile reads from the file specified by the FileName property. 

LoadFromFile is useful in briefcase-model applications, where the current snapshot of the data from the server is saved to disk for use until the application can reestablish a connection to the database server. 

To load data from a file at design time, right-click on the dataset and choose Load from File.

Note: FileName must contain data saved to a file by a previous call to this or another client dataset's SaveToFile method.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!