Working with H2 I get this error when I try to write a row with the first element being
ABC and the second being [C@26afa68a
Syntax error in SQL statement "INSERT INTO USER VALUES(ABC,[[*]C@F4D5BC9) " expected "), DEFAULT, NOT, EXISTS, SELECT, FROM"; SQL statement:INSERT INTO user VALUES(abc,[C@f4d5bc9) [42001-167]
I don’t know if there is a way to get H2 to accept Special Characters, but it would be great to know how to deal with this.
Thanks!
You should use a PreparedStatement:
Using a PreparedStatement is the preferred solution, because that way you don’t have to escape the data. If
ABCand / and[C@f4d5bc9are constants, you could use: