lcc = getEmbedConnection().getLanguageConnection();
// Context used for preparing, don't set any timeout (use 0)
statementContext = lcc.pushStatementContext(isAtomic, false, updateWhereCurrentOfSQL.toString(), null, false, 0L);
org.apache.derby.iapi.sql.PreparedStatement ps = lcc.prepareInternalStatement(updateWhereCurrentOfSQL.toString());
Activation act = ps.getActivation(lcc, false);
//in this for loop we are assigning values for parameters in sql constructed earlier with columnname=?,...
for (int i=1, paramPosition=0; i<=rd.getColumnCount(); i++) {
if (columnGotUpdated[i-1]) //if the column got updated, do following
act.getParameterValueSet().getParameterForSet(paramPosition++).setValue(updateRow.getColumn(i));
}
// Don't set any timeout when updating rows (use 0)
// Execute the update where current of sql.
org.apache.derby.iapi.sql.ResultSet rs = ps.execute(act, true, 0L);
SQLWarning w = act.getWarnings();
if (w != null) {
addWarning(w);
}
rs.close();
rs.finish();