DtpConnection getRelConnection(String relDefName)
Returns a DtpConnection object.
DtpConnectionException - If an error occurs while trying to establish the database connection.
This method establishes a connection to the database that contains the relationship tables used by the relDefName relationship, and provides a way to perform queries and updates to the relationship database. The method returns a DtpConnection object through which you can execute queries and manage transactions. See the methods in the DtpConnection class for more information.
The connection is released when the map is finished executing. You can explicitly close this connection with the releaseRelConnection() method.
The following example establishes a connection to the database containing the relationship tables for the SapCust relationship. It then uses a transaction to execute a query for inserting rows into a table in the SapCust relationship.
DtpConnection connection = getRelConnection("SapCust"); // begin a transaction connection.beginTran(); // insert a row connection.executeSQL("insert..."); // update rows... connection.executeSQL("update..."); // commit the transaction connection.commit();