Hi, Try using prepared statements. They allow parameters, so basically you define a query with parameters, then set parameter values, and jdbc takes care of all char-quoting.
Greetings, deacon Marcus > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 10:55 AM > To: [EMAIL PROTECTED] > Subject: Handling apostrophes > > > Hi all, > > I'm developing an application which uses java servlets and JSPs and > a MySQL database running on Tomcat 4.0. > > I take user input, store it on the db, then display it again. As > soon as someone tried inputiing an apostrophe, it all fell over. It seems > that I have to encode and decode every single text field. Is this correct, > or is there a better way ? > > Thanks > > Dave > > >
