Hi Tim, I think this is an example of what you want.   The single quote serves as the 
escape symbol.  Hope this helps...

Mike

          ResultSet rs = stmt.executeQuery("INSERT INTO employees SET FirstName = '" + 
empFirstName + "', LastName =   '" + empLastName + "', Department = '" + empDepartment 
+ "', Id =  " + id);


>>> Tim Stoop <[EMAIL PROTECTED]> 05/23/00 06:58AM >>>
Hi there,

I'm writing a function in Java to be used by my servlets, but I was
wondering if Java has it's own function to escape characters in en
MySQL-string. Anyone?

Kind regards,
Met vriendelijke groet,
Tim Stoop

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to