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

email - PHP mail error ... failed to open stream : permission denied -

sql server - SQL Query - Delete duplicates if more than 3 dups? -

c# 3.0 - Issue with getting 2 chars from string using indexer -