[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'db' (#fcl)

# TBlobField.SaveToFile

Save field contents to a file

## Declaration

Source position: db.pas line 819

`public procedure TBlobField.SaveToFile(`
`const FileName: String`
`);`

## Arguments

`FileName` |  | Name of file to write data to

## Description

SaveToFile creates a file stream with FileName as the name of the file to open, en then calls SaveToStream to write the contents of the blob field to the file. The file is opened in write mode and is created if it does not yet exist.

## Errors

If the file cannot be created or is not available for writing, an exception will be raised.

## See also

LoadFromFile |  | Load the contents of the field frop a file
SaveToStream |  | Save the field's contents to stream

The latest version of this document can be found at lazarus-ccr.sourceforge.net .