How to capture/encode special character for SQL Server in java app? -


I have Java app + SQL Server database DB operation uses JDBC with dynamic SQL string. Example:

Select the column from the tab where the column = stringperm

is the StringParam user input. If the string parm contains the apostost, then the Java app will throw exceptions and say SQL can not be executed.

Never insert a user directly into an SQL query You must use the prepared space. Without changing the Java code, I do not see any way to make it secure.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -