Back to Devexpress

TdxCustomMemData.LoadFromBinaryFile(string) Method

vcl-dxmdaset-dot-tdxcustommemdata-dot-loadfrombinaryfile-x28-system-dot-string-x29.md

latest1.9 KB
Original Source

TdxCustomMemData.LoadFromBinaryFile(string) Method

Loads data from a binary file.

Declaration

delphi
procedure LoadFromBinaryFile(const AFileName: string); dynamic;

Parameters

NameType
AFileNamestring

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

TdxCustomMemData.CreateFieldsFromBinaryFile

TdxCustomMemData.LoadFromDataSet

TdxCustomMemData.LoadFromStream

TdxCustomMemData.LoadFromStrings

TdxCustomMemData.LoadFromTextFile

TdxCustomMemData.SaveToBinaryFile

TdxCustomMemData Class

TdxCustomMemData Members

dxmdaset Unit