FireDAC.Stan.Option.TFDFormatOptions.DefaultParamDataType
Delphi
property DefaultParamDataType: TFieldType read GetDefaultParamDataType write
C++
__property Data::Db::TFieldType DefaultParamDataType = {read=GetDefaultParamDataType, write=SetDefaultParamDataType, stored=IsDPDTS, default=0};
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| property | published | FireDAC.Stan.Option.pas FireDAC.Stan.Option.hpp |
FireDAC.Stan.Option | TFDFormatOptions |
Description
Specifies the default data type for parameters with ftUnknown data type.
Use the DefaultParamDataType property to specify the default data type for all parameters with ftUnknown data type. The default value is ftUnknown.
If the parameter data type is unknown at Prepare call, then FireDAC sets its type to DefaultParamDataType. If DefaultParamDataType is ftUnknown, then FireDAC raises an exception, according to which the parameter data type is unknown.
Although DefaultParamDataType allows you to avoid this exception, it affects the application performance, because a query with an inappropriate parameter data type may have a bad execution plan.