FireDAC.Stan.Option.TFDFormatOptions.StrsTrim2Len
Delphi
property StrsTrim2Len: Boolean read GetStrsTrim2Len write SetStrsTrim2Len
C++
__property bool StrsTrim2Len = {read=GetStrsTrim2Len, write=SetStrsTrim2Len, stored=IsSTTLS, default=0};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDFormatOptions |
Description
Controls the trimming of string values to the declared length.
Use the StrsTrim2Len property to specify whether FireDAC should trim too long string values to the maximum declared length (True) or not (False). The default value is False.
For example, if the application is trying to assign '12345' to the field declared in the database as VARCHAR(3), then FireDAC raises an exception 'value too long'. If StrsTrim2Len = True, FireDAC trims the value to '123'.