FireDAC.Comp.Script.TFDScript.ExecuteStep

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ExecuteStep(AParser: TFDScriptParser): Boolean; overload;
function ExecuteStep: Boolean; overload;

C++

bool __fastcall ExecuteStep(TFDScriptParser* AParser)/* overload */;
bool __fastcall ExecuteStep()/* overload */;

Properties

Type Visibility Source Unit Parent
function public
FireDAC.Comp.Script.pas
FireDAC.Comp.Script.hpp
FireDAC.Comp.Script TFDScript

Description

Extracts and executes the next command from the SQL script.

Call the ExecuteStep method to extract and execute the next command from the SQL script.

The extraction starts from the Position position in the SQL script, if the SQL script is stored in the SQLScript collection. If the SQL script is stored in a file, then the extraction starts from the current position in a file stream.

After the execution of a command, the current position is forwarded to the first symbol after the processed command. If a script is stored in SQLScript, then the Position property is updated. If a script is stored in a file, then the file stream position is updated.

If the script command execution raised an exception and IgnoreError is False, then this exception is propagated outside the method.

Before the execution, the BeforeExecute event handler is called. After the execution is finished, the AfterExecute event handler is called. If a subscript call is encountered, then the subscript is executed by the ExecuteStep method.

Example

FDScript1.Position := Memo1.CaretPos;
FDScript1.ExecuteStep;
Memo1.CaretPos := FDScript1.Position;

See Also