java - What could happen if I use resultset.getString() by passing a blob? -
i have blob column in table, using mysql. i'm trying value getstring method of resultset, rs.getstring("xxxxxx")
i'm not sure if there problem in situation. dose depend on stored in column?
can this?
it doesn't matter stored in database. doesn't matter string or int. data query result , interpreted string. string not sequence of bytes. reference object expected string. means reference points structure in memory structure of other references. so, when take sequence of bytes , assume reference object then, likely, have runtime exception. classcastexception knows data has. exception unpredictable in case.
bottom line - don't this.
Comments
Post a Comment