• Post Reply Bookmark Topic Watch Topic
  • New Topic

inserting string values with an apostrophe  RSS feed

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I have a question: How can I insert or update an employee name into my database that the string values have an apostrophe? For example Marina O'Reili (note the apostrophe ') will not be accepted as employee name.
Any inputs?
Thanks,
Eric
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a PreparedStatement instead of a regular Statement.
Therefore you would have:
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!