|
AnyDAC
|
The script arguments.
Use the Arguments property to specify the script arguments.
An argument may be referenced as a substitution variable with the &<argument number> name. The arguments may be used in any place of the script. They are similar to the Macros, but in contrast to the Macros are using positional syntax, while macros are using named syntax.
The @ / @@ commands allow to specify arguments as a comma-separated list after the script name. When arguments are not specified, then they will be inherited from the parent script.
property Arguments: TStrings;
with ADScript1.Arguments do begin Add('scott/tiger@orasrv'); Add('c:\temp\'); end; with ADScript1.SQLScripts.Add do begin SQL.Add(....); SQL.Add('connect &1'); SQL.Add(....); SQL.Add('spool &2'); end;
with ADScript1.SQLScripts.Add do begin SQL.Add('@@DropTab Orders'); SQL.Add('@@DropTab Tickets'); SQL.Add('@@DropTab Posts'); end; with ADScript1.SQLScripts.Add do begin Name := 'DropTab'; SQL.Add('drop table &1;'); SQL.Add('drop table &1_details;'); end;
|
What do you think about this topic? Send feedback!
|