Product: | JDBC DBConnectivity Product for IBM Db2 (HiT JDBC/DB2) |
Version: | All |
ID: | 1202 |
Summary: | How to handle an exception when user input includes newline characters |
If user input includes newline characters, the data connector generates an exception. To avoid the exception, prior to sending the SQL statment string to the driver, your application code should remove the newline characters from the string as follows:
statement.replace('\n', ' ');