Top  | Previous | Next

system.db.addDatasource

Description

Adds a new database connection in Ignition.

 

information2 This function accepts keyword-style invocation. See also: Functions / Keyword Invocation

Syntax

system.db.addDatasource(jdbcDriver, name, description, connectUrl, username, password, props, validationQuery, maxConnections)

Parameters

String jdbcDriver - The name of the JDBC driver in Ignition.

String name - The datasource name.

String description - A description for the datasource connection.

String connectUrl - Default is the connect URL for JDBC driver.

String username - The username of the datasource connection.

String password - The password of the datasource connection.

String props - The extra connection parameters.

String validationQuery - Default is the validation query for the JDBC driver.

Integer maxConnections - Default is 8.

Returns

nothing

Scope

All

Examples

 

system.db.addDatasource(jdbcDriver="MySQL ConnectorJ", name="MySQL", 

 connectURL="jdbc:mysql://localhost:3306/test", username="root", 

 password="password", props="zeroDateTimeBehavior=convertToNull;")