FireDAC.Comp.Client.TFDCustomCommand.OpenOrExecute

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
FireDAC.Comp.Client.pas
FireDAC.Comp.Client.hpp
Unit: FireDAC.Comp.Client
Parent: TFDCustomCommand

Delphi

function OpenOrExecute(ABlocked: Boolean = False): Boolean;

C++

bool __fastcall OpenOrExecute(bool ABlocked = false);

Description

Executes the SQL command, and optionally returns the cursor.

Call the OpenOrExecute method to execute the SQL command and optionally return the cursor. If the SQL command returns the cursor, State takes the csActive value after the call, and you can fetch rows from the current cursor using the Fetch method. If the SQL command does not return the cursors then the State will take the csPrepared value.

The OpenOrExecute method is useful when you do not know the kind of the command to be executed.

See Also