The com.ibm.db2.jcc.DB2Binder class provides the runJDBCBinder method as an alternative to the DB2Binder utility for binding IBM® Data Server Driver for JDBC and SQLJ packages.
The following methods are defined only for the IBM Data Server Driver for JDBC and SQLJ.
public void runJDBCBinder(DB2Connection connection,
java.util.Properties db2BinderOptions)
throws SQLException
Binds a IBM Data Server Driver for JDBC and SQLJ package.
For example, suppose that con is a previously defined Connection object. Set the property values in the following way.
DB2Binder db2binder = new DB2Binder();
Properties prop = new Properties();
prop.put ("action", "replace");
prop.put ("bindoptions", "DEFER(PREPARE) IMMEDWRITE(NO) REOPT(NONE)");
db2binder.runJDBCBinder((DB2Connection)con,prop);
This method is not supported for connections to IBM Informix®.