java.sql.Connection getJDBCConnection(
java.lang.String pPropertyName)
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.
Parameter |
Type |
Description |
---|---|---|
pPropertyName |
String |
Name of connection to be returned. |
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. |
Gets the source connection and creates a statement for this connection.
java.sql.Connection sourceConnection = odiRef.getJDBCConnection("SRC");
java.sql.Statement s = sourceConnection.createStatement();