skip to main content
Using the JDBC Client : JDBC Connection Properties : InitializationString
 

InitializationString

Description

Specifies one or multiple SQL commands to be executed by the JDBC Client after it has established the connection to the database and has performed all initialization for the connection. The following connection URL sets the handling of null values to the JDBC Client default:
jdbc:datadirect:openaccess://server1:5000;
InitializationString=set ANSINULL off;
ServerDataSource=test
Multiple commands must be separated by semicolons. In addition, if this property is specified in a connection URL, the entire value must be enclosed in parentheses when multiple commands are specified. The following connection URL sets the handling of null values to the JDBC Client default and allows delimited identifiers:
jdbc:datadirect:openaccess://server1:5000;
InitializationString=(set ANSINULL off;
set QUOTED_IDENTIFIER on);ServerDataSource=test
If the execution of a SQL command fails, the connection attempt also fails and the JDBC Client throws an exception indicating which SQL command or commands failed.

Valid Values

string
where string is one or multiple SQL commands.

Default

None

Data type

String