FireDAC.Comp.Client.TFDUpdateSQL.Commands

From RAD Studio API Documentation
Jump to: navigation, search

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

Delphi

property Commands[ARequest: TFDUpdateRequest]: TFDCustomCommand read GetCommand;

C++

__property TFDCustomCommand* Commands[Firedac::Stan::Option::TFDUpdateRequest ARequest] = {read=GetCommand};

Description

Returns the reference to the internal command object that will handle the update request.

The Commands indexed property returns a reference to the internal TFDCustomCommand objects that will handle the update requests, specified by the ARequest index. Use this reference to set up the command properties not accessible through the TFDUpdateSQL interface, like Params or Macros.

Example

FDUpdateSQL1.InsertSQL := 'insert into !tab (workstation_time, id, name) values (:workstation_time, :new_id, :new_name)';
FDUpdateSQL1.Commands[arInsert].ParamByName('workstation_time').AsDateTime := Now();
FDUpdateSQL1.Commands[arInsert].MacroByName('tab').AsRaw := 'mytab';

See Also