getJDBCConnection() method

Usage

java.sql.Connection getJDBCConnection(
java.lang.String pPropertyName)

Description

This method returns the source or target JDBC connection for the current task.

Warning! This method does not return a string, but a JDBC connection object. This object may be used in your Java code within the task.

Parameters

Parameter

Type

Description

pPropertyName

String

Name of connection to be returned.

pPropertyName values

The following table lists the different values possible for pPropertyName :

Parameter value

Description

SRC

Source connection for the current task.

DEST

Target connection for the current task.

Examples

Gets the source connection and creates a statement for this connection.

java.sql.Connection sourceConnection = odiRef.getJDBCConnection("SRC");

java.sql.Statement s = sourceConnection.createStatement();