Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
Posted by: Filipe Silva
Date: September 02, 2020 04:54AM

Hi Agha,

There may be some issue with values sanitization. What does `book.getCover()` return?

You can see the exact query the server is trying to run by turning on its general log (check documentation to see how to do this), or you can make Connector/J log the queries it executes by using the connection option "profileSQL=true" (note that you may have to set "maxQuerySizeToLog" to an higher value to see the entire query)

Also, you should consider using the option "useServerPrepStmts=true" to use *real* prepared statements and leverage better sanitization of values.

IHTH

Options: ReplyQuote


Subject
Written By
Posted
Re: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
September 02, 2020 04:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.