In this topic, you can find the syntax of command-line parameters for X-SQLT Command-line Processor.
Syntax:
xsqlt.exe <project-file>|<inline-options>|<project-source> [<parameters>] [-p] [-v] [-l<log-file>] [-w] [-?]
Description:
- <project-file>
- A path to the X-SQLT project file, that will be processed.
- <inline-options>
- A simplified definition of one X-SQLT script, that is passed inline as command-line arguments. It is very useful option for performing some simple operations like XSL transformation, file conversion, etc. The syntax of inline-options is described in a separate topic - see inline options.
- <project-source>
-
Full source of X-SQLT project. This option is supported even it is not usual to pass xml formatted string as a command-line argument.
The command-line argument is taken as project-source, if it starts with '<?xml' string and there is no other argument, that could be taken as project-file or as a part of inline-options. - <parameters>
- Parameter values. You can pass values of (X)SQL script parameters and/or values of XSL template parameters. Each parameter should be passed as parameter=value pair. It is recommended (but not required) to enclose each pair with quotes. If no parameter is passed, the default parameter values (stored inside the project file) will be used for processing, unless you use -p command-line switch (see bellow).
- -p
- If this switch is used, the user will be prompted to enter a value of each parameter defined inside the project. You should use this switch carefully, because the utility will be waiting for user input if any parameter is defined inside the project. So, for example, do not use this switch for automatic utility executions in server mode (when no user is logged on), or when the process is started as hidden.
- -v
- Verbose mode. Not only possible errors, but also additional informations will be displayed during processing.
- -l
- Log file will be created. If you pass the switch without specified filename, the log file will be created near the project file.
- -w
- Wait for the keypress after completion. The window will not be closed immediately after completing the execution, but it will wait for the user input (ENTER key). You should use this switch carefully, because the utility will be waiting for user input after the execution is completed. So, for example, do not use this switch for automatic utility executions in server mode (when no user is logged on), or when the process is started as hidden.
- -?
- Brief help for command-line usage will be displayed (other parameters are ignored).
Exit codes:
0 - Project was completed successfully.
1 - Syntax or data error occured.
2 - Unknown error.
Examples:
xsqlt.exe "c:\samples\my project.xsqlt" -v
xsqlt.exe "c:\samples\my project.xsqlt" "CUSTOMER=Our customer" "ORDERID=255"
See also