FireDAC.Stan.Option.TFDFormatOptions.StrsEmpty2Null
Delphi
property StrsEmpty2Null: Boolean read GetStrsEmpty2Null write SetStrsEmpty2Null
C++
__property bool StrsEmpty2Null = {read=GetStrsEmpty2Null, write=SetStrsEmpty2Null, stored=IsSE2NS, 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 conversion of zero-length string values to NULL value.
Use the StrsEmpty2Null property to control whether FireDAC should convert string values with zero length to NULL value (True) or not (False). The default value is False.
The property applies to column values at rows fetching and to parameter values at command execution. The property will be applied after StrsTrim is applied.
When an application is executing a query:
FDQuery1.SQL.Text := 'SELECT * FROM MyTab WHERE fld = :p'; FDQuery1.Params[0].AsString := ; FDQuery1.Open;
And the query returns no records, although MyTab has some records with an empty string in the FLD field, then you have to set StrsEmpty2Null to False to get those records.