Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to deal with the special character in java and oracle!!!

 
Geoffrey Ren
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I got the user inputting. For example, user input the value "test's"/"test&s"/"test\s". How to insert the value into oracle DB by jdbc.
Thanks for you reply!
 
John Dunn
slicker
Ranch Hand
Posts: 1108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<< "test's"/"test&s"/"test\s" >>
try this from java:
str = "/"test's/"" + "/" + "/"test&s/"" + "/" + "/"test\s/"";
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic