static private Update ( |
||
table | ||
join | string | |
set | string | |
where | string | |
vars | object | |
return | bool |
internal static bool Update(SqlTable table, string join, string set, string where, object[] vars)
{
if(table != null && set != null && where != null && vars != null) {
try {
Debug.Assert(set.Trim().Length > 0);
Debug.Assert(where.Trim().Length > 0);
Debug.Assert(vars.Length > 0);
string sql = "update " + table.tableName;
if(join != null) {
sql += " " + join;
}
sql += " set " + set + " where " + where;
return ExecuteNonQuery(sql, vars) > 0;
} catch(Exception e) {
Log.exception(e);
}
}
Debug.Fail();
return false;
}
public bool Update(string join, string set, string where, object[] vars) { return(SqlController.Update(this, join, set, where, vars)); }