I am trying to escape a whole string for insert into a longtext or varchar. Basically I have a string full of all types of special characters and special words (ex. LIKE) and I just want to escape the whole thing so that I can insert it into my H2 database.
I've asked a few friends and they said that I should try serializing the data. Is this the proper way to insert random strings into the db? Should I be trying to do this with prepared statements?
Sorry I'm new to H2 and not that great with SQL. Thanks for the help in advance!
If you are looking for examples on how to use a PreparedStatement:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With