Data.DB.TField.DataSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property DataSize: Integer read GetDataSize;

C++

__property int DataSize = {read=GetDataSize, nodefault};

Properties

Type Visibility Source Unit Parent
property public
Data.DB.pas
Data.DB.hpp
Data.DB TField

Description

Indicates the amount of memory needed to store a field component's value.

Check DataSize to determine the number of bytes required to store a field component's value. Use DataSize to determine the required size of a buffer for working with the field's value in native format. For example, use DataSize to determine the buffer size needed by the GetData and SetData methods.

The value of DataSize for TField is 0. Most descendants of TField override this property to specify the size required by the specific field type they represent. A value of zero should not be interpreted as meaning that the field value requires no memory. A value of zero indicates that the memory required for the field is indeterminate.

Note: For TBlobField objects, DataSize returns the size of the blob object, if it can be determined.
Note: TIntegerField.DataSize and TLongWordField.DataSize return values now use SizeOf(Integer) and SizeOf(Cardinal) instead of SizeOf(LongInt) for ftInteger and SizeOf(LongWord) for ftLongword.


See Also

Code Examples