GET_CONNECTION

Script Function: Reads information from a DB-type Connection object.

Syntax

GET_CONNECTION (Object name, Attribute)

Syntax

Description/Format

Object name

The name of a DB-type connection object (Connection (CONN)).
Format: AE name, script literal or script variable

Attribute

The value that should be read from the object.
Format: AE name, script literal or script variable

Allowed values:

  • db.type = The database type.
    Possible return codes:
    • "MSSQL" - MS SQL Server
    • "DB2" - IBM DB2
    • "ORACLE" - Oracle
    • "SYBASE" - Sybase
    • "MYSQL" - MySQL
    • "INFORMIX" - Informix
    • "ORACLE_OCI" - Oracle OCI
  • db.server = The name of the DB servers.
  • db.port = The port number of the DB server.
  • db.name = The name of the database.
  • DbUserid = The database user.
  • DbPassword = The password of the DB user.
  • Login = The name of the alternate Login object.

Warning! The value DbUserid has to be used in case-sensitive databases exactly as printed here.


Return Codes

Required value of the CONN object.

This script function reads a certain value of a DB-type Connection object and returns it as code.

A runtime error occurs when the system cannot find the specified object, when it is not a DB-type Connection object or when the specified attribute is not valid.

Examples

The following example retrieved the database type of the Connection object CONN.DB and writes it to the activation report.

:SET &VAR#GET_CONNECTION(CONN.DB, db.type)
:&VAR#

This is how the related line appears in the activation report:

2013-01-30 12:45:21 - U0020408 MSSQL

See also: