@return The number of rows affected by the update. For example, if 10 rows are deleted, then 10 is returned. If no rows are deleted, 0 is returned.<P>
**/
protected int update(DBCSPlain dbcs_plain, DBCSPrepared dbcs_prepared) throws SQLException {
DBCSOfType dbscot = new DBCSOfType("update", dbcs_plain, dbcs_prepared);
int iStatus = 0;
try {
if(dbscot.isPlain()) {
dbscot.getDBConnDirect().debug("update: " + dbscot.getSql());
iStatus = dbscot.getStatement().executeUpdate(dbcs_plain.getSql());
} else {
dbscot.getDBConnDirect().debug("update: " + ((DBCSPrepared)dbscot.getDBConnStatement()).getSqlAndParams());
iStatus = dbscot.getPrepared().executeUpdate();
}
} catch(SQLException sqlx) {
dbscot.getDBConnDirect().throwSQLX(this.getClass().getName() + ".update: " + sqlx.toString());
}
if(doThrowOnNoRowUpdate() && iStatus == 0) {
dbscot.getDBConnDirect().throwSQLX(this.getClass().getName() + ".update: Zero rows were affected by this update statement, and doThrowOnNoRowUpdate() is true.");
}
return iStatus;
}