java - JDBC API to trim String length to match with database column specification -
my input string longer database column specification is. have api in jdbctemplate automatically trim string match database column limit.
not yet sure, limit in column may change in future , may vary according environment. limiting string in code not feasible solution, want store as possible.
no.
should part of input validation.
please note in case should never trust client side, client-side input validation (i.e. putting maxlength on input field) required it's not enough.
should perform server side input validation, , in case should not allow input exceed database column limit.
Comments
Post a Comment