Hi,
I'm passing in a string. However the string has an apostrophe(single quote '). When i'm trying to pass this string into a sql statement, sql is reading it as a single quote '. Is there a function in java to replace a single quote with another character.
s = (String)hm.get(keyInt);
...............
rset = stmt.executeQuery("SELECT ad.ANSWER_ID FROM ANSWER_DESCRIPTION ad WHERE ad.ANSWER_DESCRIPTION ='"+s+"'"
Thanks!
I'm passing in a string. However the string has an apostrophe(single quote '). When i'm trying to pass this string into a sql statement, sql is reading it as a single quote '. Is there a function in java to replace a single quote with another character.
s = (String)hm.get(keyInt);
...............
rset = stmt.executeQuery("SELECT ad.ANSWER_ID FROM ANSWER_DESCRIPTION ad WHERE ad.ANSWER_DESCRIPTION ='"+s+"'"
Thanks!