}
rs2.close();
String collectorTitleCache = TeamDefaultCacheStrategy.INSTANCE().getCollectorTitleCache(team);
+ collectorTitleCache = escapeSingleQuote(collectorTitleCache);
sql = " UPDATE @@AgentBase@@ SET collectorTitleCache = '" + collectorTitleCache + "' WHERE id = " + id;
datasource.executeUpdate(caseType.replaceTableNames(sql));
}
}
}
+ protected String escapeSingleQuote(String str) {
+ return str == null? null : str.replace("'", "''");
+ }
+
private Person handlePerson(ResultSet rs, ICdmDataSource datasource, CaseType caseType) throws SQLException {
//set collectorTitle
int id = rs.getInt("id");