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

# TParam.AssignFromField

Copy field type and value

## Declaration

Source position: db.pas line 1166

`public procedure TParam.AssignFromField(`
`Field: TField`
`);`

## Arguments

`Field` |  | Field to copy type and value from.

## Description

AssignFromField copies the field value and data type (TField.DataType) to the parameter instance. If Field is Nil, nothing happens. This is the reverse operation of TParam.AssignToField.

## Errors

An EDatabaseError exception is raised if the field has an unsupported field type (for types ftCursor, ftArray, ftDataset,ftReference).

## See also

TParam.Assign |  | Assign one parameter instance to another
TParam.AssignField |  | Copy value from field instance
TParam.AssignToField |  | Assign parameter value to field

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