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

# TParam.SetData

Set the parameter value from a buffer

## Declaration

Source position: db.pas line 1249

`public procedure TParam.SetData(`
`Buffer: Pointer`
`);`

## Arguments

`Buffer` |  | Buffer to read data from

## Description

SetData performs the reverse operation of TParam.GetData: it reads the parameter value from the memory area pointed to by Buffer. The size of the data read is determined by TParam.GetDataSize and the type of data by TParam.DataType : it is the same storage mechanism used by TField, and so can be used to copy the value from a TDataset record buffer.

## Errors

Not all field types are supported. If an unsupported field type is encountered, an EDatabaseError exception is raised.

## See also

TDataset |  | Base class for records-based data-access
TParam.GetData |  | Get the parameter value from a memory buffer
TParam.DataType |  | Data type of the parameter
TParam.GetDataSize |  | Return the size of the data.

Documentation generated on: May 14 2021