FireDAC.Comp.Client.TFDRdbmsDataSet.Prepared

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Prepared: Boolean read GetPrepared write SetPrepared stored IsPS default False;

C++

__property bool Prepared = {read=GetPrepared, write=SetPrepared, stored=IsPS, default=0};

Properties

Type Visibility Source Unit Parent
property public
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
FireDAC.Comp.Client TFDRdbmsDataSet

Description

Gets or sets command prepare for execution status.

Set Prepared to True to prepare the SQL command for execution. Setting Prepared to True, will call Prepare method. It is not required to set Prepared to True for standard SQL command before execution, because first Execute / ExecSQL / Open call will automatically prepare command. But it is required for stored procedures, if you need to automatically populate Params collection. After command is prepared, SQLText will return SQL command text as it is sent to the DBMS. 

To prepare SQL command DBMS connection must be active, otherwise an exception will be raised. 

After SQL command preparation, the application cannot change command parameter data types and sizes, otherwise on next Execute or Open call an exception will be raised. So, setup parameters before setting Prepared to True

Set Prepared to False to unprepare SQL command and release all its resources. Setting Prepared to False, will call Unprepare method.

See Also