Working with EmbeddedScript
The EmbeddedScript class provides support for starting a scripting session, executing scripting commands, retrieving results, and ending the session using the Java™ programming language.
Modifier and Type / Method | Description |
---|---|
void | open() throws EmbeddedScriptExceptionOpens a connection to the command line processor.
|
void | execute() throws EmbeddedScriptException Executes
a script command. Statements do not need to be terminated with semicolon
(;) when executing commands using EmbeddedScript. If the command succeeds,
the results can be accessed by calling
|
void | close() Closes from the command line processor session. Closing is required and ensures that the command line processor successfully disconnects from datastores and Access Server, if those connections are not closed using scripting commands.
|
Result | getResult() Returns the last
result. Results can be printed to the console using
|
int | getResultCode() Returns the result code for statement execution. |
String | getResultMessage() Returns the last result message. The message may be null if the command executes successfully. |
int | getStatus() Returns the status of the command as EmbeddedScript.SUCCESS or EmbeddedScript.FAILURE. |
String | getVerboseMessages() If verbose is enabled, returns any messages that have been logged during command execution. To enable verbose mode, execute:
|
The EmbeddedScriptException class provides access to the result error code and result error message
Header | Header |
---|---|
int | getResultCode() Returns the result code for statement execution. |
String | getResultCodeAndMessage() Returns a formatted result code and message. |
String | getResultMessage() Returns the last result message. The message may be null if the command executes successfully. |