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

# TParam.SetData

Set the parameter value from a buffer

## Declaration

Source position: db.pas line 1173

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

## Arguments

`Buffer` |  | Buffer to read data from

## Description

SetData performs the rever 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.

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