FireDAC.Comp.Script.TFDScript.Arguments
Delphi
property Arguments: TStrings read FArguments write SetArguments;
C++
__property System::Classes::TStrings* Arguments = {read=FArguments, write=SetArguments};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | published | FireDAC.Comp.Script.pas FireDAC.Comp.Script.hpp |
FireDAC.Comp.Script | TFDScript |
Description
The script arguments.
Use the Arguments property to specify the script arguments.
An argument can be referenced as a substitution variable with the &<argument number> name. The arguments can be used in any place of the script. They are similar to Macros, but, in contrast to the Macros, they use positional syntax, while macros use name syntax.
The @ / @@ commands allow you to specify arguments as a comma-separated list after the script name. If arguments are not specified, then they are inherited from the parent script.
Example 1
with FDScript1.Arguments do begin Add('scott/tiger@orasrv'); Add('c:\temp\'); end; with FDScript1.SQLScripts.Add do begin SQL.Add(....); SQL.Add('connect &1'); SQL.Add(....); SQL.Add('spool &2'); end;
Example 2
with FDScript1.SQLScripts.Add do begin SQL.Add('@@DropTab Orders'); SQL.Add('@@DropTab Tickets'); SQL.Add('@@DropTab Posts'); end; with FDScript1.SQLScripts.Add do begin Name := 'DropTab'; SQL.Add('drop table &1;'); SQL.Add('drop table &1_details;'); end;