Data.DB.TParam.GetData

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure GetData(Buffer: TValueBuffer); overload;
procedure GetData(Buffer: Pointer); overload; deprecated 'Use overloaded method instead';

C++

void __fastcall GetData(System::DynamicArray<System::Byte> Buffer)/* overload */;
void __fastcall GetData _DEPRECATED_ATTRIBUTE1("Use overloaded method instead") (void * Buffer)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DB.pas
Data.DB.hpp
Data.DB TParam

Description

Fills the buffer with the Value of the parameter in the native format of a database field of the appropriate type.

Use GetData to obtain the value of a parameter in the format ready to be written directly to the underlying database. That format is the format used by physical database fields corresponding to DataType. Buffer must have enough space to hold the information. Use the GetDataSize method to determine the necessary size.

The native format for a database field may not be the same as the datatype used by the corresponding field object. Use the As... properties to get the value in the type used by the corresponding field object. Use GetData to get the value in the native database format.

For example, when DataType is ftBCD, GetData retrieves the value in binary-coded decimal, even though the TBCDField object uses Currency to store and manipulate its values. AsBCD gets the value in the Currency type.

See Also