InitializationString
- Last Updated: May 15, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- IBM Db2 5.1
- MySQL 5.1
- Progress OpenEdge 5.1
- SAP Sybase 5.1
- Documentation
Purpose
Specifies 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 throws an exception indicating which SQL command or commands failed.
You can use this property to override the session wait_timeout value that is used by the InteractiveClient property for the current connection.
Valid Values
string
where:
- string
- is one or multiple SQL commands.
Example
The following URL sets the session wait_timeout variable to 3600 (seconds) and turns on a warning count for simple inserts.
jdbc:datadirect:mysql://server1:3306;DatabaseName=test;
InitializationString=(set@@wait_timeout=3600;set@@sql_warnings=1)
Default
None
Data Type
String