james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Serge Knystautas <ser...@lokitech.com>
Subject Re: escaping of SQL strings
Date Sat, 13 Dec 2003 16:58:58 GMT
Richard O. Hammer wrote:
> I stumbled into this question when, using my James-offshoot server, I 
> sent a test message with a possessive (single quote) in the subject:
> Subject: Friday's test
> and it failed with
> java.sql.SQLException: ERROR:  parser: parse error at or near "s"

You shouldn't do escaping yourself in Java.  Do 
PreparedStatement.setString(paramNum, stringValue)

Serge Knystautas
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message