Skip to main content

TdxCustomMemData.LoadFromBinaryFile(string) Method

Loads data from a binary file.

Declaration

procedure LoadFromBinaryFile(const AFileName: string); dynamic;

Parameters

Name Type
AFileName string

Remarks

Use this method to load data from a binary file specified by the FileName parameter.

Note

A file specified by the FileName parameter must contain data in the ExpressMemData internal format (For example, data written to a file by another ExpressMemData using the SaveToBinaryFile method).

Example

// Load data from a binary file
procedure TForm1.Button1Click (Sender: TObject);
begin
  with dxMemData1 do
  begin DisableControls;
    // Define comma as column separator
    LoadFromBinaryFile(ExtractFileDir(Application.ExeName) + 'mdata.bin');
    EnableControls;
  end;
end;

At design time, you can use the functionality provided by the ExpressMemData Persistent Editor to save/load data from a binary file (via the Save… and Load… buttons).

See Also