skip to main content
Connection Option Descriptions : Initialization String
  

Try DataDirect Drivers Now

Initialization String

Attribute

InitializationString (IS)

Purpose

One or multiple SQL commands to be executed by the driver after it has established the connection to the database and has performed all initialization for the connection. If the execution of a SQL command fails, the connection attempt also fails and the driver returns an error indicating which SQL command or commands failed.

Valid Values

string
where:
string
is one or multiple SQL commands.
Multiple commands must be separated by semicolons. In addition, if this option is specified in a connection URL, the entire value must be enclosed in parentheses when multiple commands are specified.

Example

When mapping custom objects to a relational model, the driver exposes the different namespaces for the packages as different schemas within the relational model. For example, if you create an object called bar in the foo namespace, the driver exposes a schema called FOO that contains a table called BAR. To access this table using single part naming convention, the application can change the current schema by passing the SQL command ALTER SESSION SET CURRENT_SCHEMA = FOO in the InitializationString property. For example
DSN=Service Cloud;UID={test@abccorp.com};PWD=secret;InitializationString=(ALTER SESSION SET CURRENT_SCHEMA = FOO)

Default

None

GUI Tab

Advanced tab