GET_CONNECTION
Use the GET_CONNECTION script function to read a specific value of a DB-type Connection object and have this value returned as code. A runtime error occurs when the system cannot find the specified object, if it is not a DB-type Connection object, or if the specified attribute is not valid.
Syntax
GET_CONNECTION (Object name, Attribute)
Parameters
| Parameter | Description | Format | Allowed Values / Notes |
|---|---|---|---|
| Object name | Name of a DB-type Connection object. For details, see Connection (CONN). | AE name, script literal, or script variable | n.a. |
| Attribute | Value to be read from the object. | AE name, script literal, or script variable |
|
Return Codes
The return code is value of the CONN object that you defined.
Examples
The following example retrieves the database type of the Connection object CONN.DB, and writes it to the activation report:
:SET &VAR# = GET_CONNECTION(CONN.DB, db.type)
:P &VAR#
This is how the related line appears in the activation report:
2022-07-30 12:45:21 - U0020408 MSSQL
See also: