SET_DATABASE_CONNECTION

 

 

Purpose

SET_DATABASE_CONNECTION enables the set up of runtime database connection strings.

Syntax

SET_DATABASE_CONNECTION(db_name,connection_string)

Operation

db_name is the database name. The maximum length of the logical database name is 20 characters and must be a database specified in the pro4v[n].ini.
connection_string
 is the connection string.
The maximum length of the database connection string is 80 characters and must conform to the requirements of the connection as specified in the pro4v[n].ini.

Remarks
 

The database must be specified in pro4v[n].ini for the Logic Command to work correctly

The connection string must conform to the requirements of the connection as specified in the pro4v[n].ini.

Each call to SET_DATABASE_CONNECTION adds the connection string to the list of connection strings, so it is not advisable to use this option repeatedly.

Example
 

To set up a database connection to a database called '$Database' with a connection string of '$Connection':

Example pro4v[n].ini entry:

[Database - vespa]
FILETYPE=ORACLE
CONNECTION=system/manager@vespa_server1)

$Database = "vespa"
$Connection = "system/manager@vespa_server1"

SET_DATABASE_CONNECTION($Database, $Connection)

Comment on this topic

Topic ID: 520253