aspose file tools*
The moose likes JDBC and the fly likes inserting string values with an apostrophe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "inserting string values with an apostrophe" Watch "inserting string values with an apostrophe" New topic
Author

inserting string values with an apostrophe

Eric Espares
Greenhorn

Joined: Apr 04, 2002
Posts: 12
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
brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
Use a PreparedStatement instead of a regular Statement.
Therefore you would have:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: inserting string values with an apostrophe
 
Similar Threads
Punctuation is kicking my butt!
ArrayList
xsd : defining array
[WAS5]application deployment
Insert query with apostrophe