开发者

JDBC + statement.setEscapeProcessing(false)

开发者 https://www.devze.com 2023-01-19 05:17 出处:网络
Just want to know the exact effects of statement.setEscapeProcessing(false)as 开发者_如何学Goanywhere in documentation i am not finding proper explainationhere are my questions

Just want to know the exact effects of statement.setEscapeProcessing(false) as 开发者_如何学Goanywhere in documentation i am not finding proper explaination here are my questions

1) statement.setEscapeProcessing(false) will not any effects if we dont have escape clause in query . is this correct ?

2) If first one is correct why query modification happens even if i dont use any escape clause in my query but table name contains some special caharcter like ? and also statement.setEscapeProcessing(true) which is default. i tested this out here ? gets replaced with ':1' witout the quotes

sample query - SELECT * FROM CLIENT.\"abc?table\" where rownum=1

when i set statement.setEscapeProcessing(false) and run the above query it works i.e no replacement happens

3) if statement.setEscapeProcessing(true) does escape for the whole query then whta is the exact difference between escape processing true and escaping the values using preparedStatement


You should take a look at JDBC 4.0 specifications document, section 13.4 to understand more about setEscapeProcessing() method.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号