[Overview][Constants][Classes][Index] | Reference for unit 'memds' (#fcl)

# TMemDataset.LoadFromFile

Loads the content for the dataset from the specified file name

## Declaration

Source position: memds.pp line 149

`public procedure TMemDataset.LoadFromFile(`
`AFileName: string`
`);`

## Arguments

`AFileName` |  | File name with the content loaded in the method

## Description

LoadFromFile is used to load the content for the dataset from the specified file name. LoadFromFile creates a TFileStream for the file name specified in AFileName. The file stream is passed to LoadFromStream to load the contents of the file into the in-memory dataset. The file stream is freed prior to exiting from the method.

Use SaveToFile to save the contents of an in-memory dataset to a file on the local file system.

## See also

TMemDataset.LoadFromStream |  | Loads the content for the dataset from the specified stream
TMemDataset.SaveToFile |  | Saves field definitions and optional record data to the specified file name