SQL VARA Objects

SQL VARA objects retrieve values from external databases using SQL statements.

Prerequisites

To be able to define SQLI VARA objects, the following must be true:

Defining SQL VARA Objects

An SQL VARA object definition is made up of the following pages:

Important Considerations

Defining the Variables Page

  1. In the Variable Settings section specify the following:

    • Type

      Read-only, always SQL

    • Connection

      Connection (CONN) object of type Database that contains the connection parameters for the selected database

    • Login

      Login object that stores the name and password of the database user

      If you neither specify a Login object nor set the option Default login, the login data for accessing the database is retrieved from the Connection object.

    • Default Login

      Default Login object that is assigned to your Users (USER) definition.

      If you select this option, the Login object that is specified in the VARA object is ignored.

      An error occurs when resolving the VARA object if no login is defined in the User object.

      PromptSet variables cannot be used here.

    • SQL Statement

      SQL statements used to select specific database entries that serve as variable values.

      Variables that are directly specified in SQL are replaced. To include variables, use bind parameters.

      Maximum length: 4096 characters

    You can include PromptSet variables here when using the Dynamic Reload (Combobox Prompts) feature for combo box prompts. When you use PromptSet variables in a dynamic VARA object, the Preview feature returns an error. This is because the PromptSet variables do not exist in the dynamic VARA object. However, the PromptSet variables will be resolved when objects including the PromptSet are executed.

  2. Define the Data Types and Formatting.
  3. Define the Script Access.
  4. If you are logged in to Client 0, an additional section is available. For more information, see Client 0 VARA Objects in Other Clients.
  5. To run a command, select it and click Preview. The statements are executed and their results displayed. The preview function serves to check for potential errors in the database statements (for example, it the data type of the VARA object and of the database do not match).

    The database Agent sends the preview data to the Automation Engine in the form of a message. If this message exceeds the maximum message length that a server process accepts, an error occurs.

    Maximum length: Set in the MaxMsgSize= parameter of the Automation Engine UCSRV.INI file.

    Default value: 3145 728 bytes. You can limit the result either by using a maximum number of lines or through SQL statements.

See also: