How to escape a string on a description field

2005-10-24 Thread C.F. Scheidecker Antunes

Hello all,

I am having problems with my struts app.

I am trying to enter a long string on a description field of a MySQL 
database but it crashes if the string has caracters that need to be escaped.


What about the reversed operation when you are to display that on the JSP?

How can I fix that? Would it help if I had a prepared statement?

Shall I use a MySQL function for that?

Thanks,

C.F.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to escape a string on a description field

2005-10-24 Thread Bob Arnott

C.F. Scheidecker Antunes wrote:

Hello all,

I am having problems with my struts app.

I am trying to enter a long string on a description field of a MySQL 
database but it crashes if the string has caracters that need to be 
escaped.


org.apache.commons.lang.StringEscapeUtils is your friend, especially
public static String escapeSql(String str).

Cheers,

--
Bob Arnott


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]