Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 487BCB5DBDA for ; Mon, 22 Aug 2011 07:32:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 28740-08 for ; Mon, 22 Aug 2011 10:32:50 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from claranet-outbound-smtp03.uk.clara.net (claranet-outbound-smtp03.uk.clara.net [195.8.89.36]) by mail.postgresql.org (Postfix) with ESMTP id 93F34B5DBBE for ; Mon, 22 Aug 2011 07:32:50 -0300 (ADT) Received: from [217.158.205.40] (port=54605 helo=BSP1.visitlondon.com) by relay03.mail.eu.clara.net (relay.clara.net [213.253.3.43]:1025) with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1QvRoG-0005bx-C8 (return-path ); Mon, 22 Aug 2011 10:32:48 +0000 Message-ID: <4E523050.10000@londonandpartners.com> Date: Mon, 22 Aug 2011 11:32:48 +0100 From: Chris Wareham User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110812 Thunderbird/6.0 MIME-Version: 1.0 To: JavaNoobie CC: Subject: Re: how to Escape single quotes with PreparedStatment References: <1313841345919-4718287.post@n5.nabble.com> <4E5229C8.1000300@londonandpartners.com> In-Reply-To: <4E5229C8.1000300@londonandpartners.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: none X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201108/55 X-Sequence-Number: 22087 On 22/08/11 11:04, Chris Wareham wrote: > > stmt = con.prepareStatement(query); > Should of course be: stmt = con.prepareStatement(query.toString()); Chris