logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Sandee <tbsan...@pobox.com>
Subject Re: Log4j JDBCAppender
Date Thu, 06 Jun 2002 20:01:56 GMT
Ceki Gülcü wrote:

>>
>> Nowhere in there was I forced to escape anything.  I agree with you 
>> that if you aren't using preparedstatements, constructing an 
>> algorithm to safely, generically escape arbitrary strings for 
>> inclusion directly into a SQL is a non-trivial, possibly impossible 
>> task.  It's really something that *should* be part of the JDBC API.
>
>
> Hmm,
>
> Have you seen 
> http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/jdbc.html

> ?
>
> (more particularly the section entitled "Escaping Characters")
>
Thanks for the heads-up Ceki -- I stand corrected!  So, can the original 
problem be solved by creative use of this escape keyword/extension?  The 
page also points out:  "However, if you use a |PreparedStatement| 
instead of a simple |Statement|, most of these escape problems go away." 
 So many hammers, so few nails.  :-)



--
To unsubscribe, e-mail:   <mailto:log4j-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-user-help@jakarta.apache.org>


Mime
View raw message