Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPGQ5-00016h-MN for pgsql-jdbc@arkaria.postgresql.org; Mon, 08 Apr 2013 18:03:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPGQ5-0002vF-0l for pgsql-jdbc@arkaria.postgresql.org; Mon, 08 Apr 2013 18:03:53 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UOUsl-0003g4-7d for pgsql-jdbc@postgresql.org; Sat, 06 Apr 2013 15:18:19 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UOUse-0005xL-H9 for pgsql-jdbc@postgresql.org; Sat, 06 Apr 2013 15:18:18 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1UOUse-0004Vb-AV for pgsql-jdbc@postgresql.org; Sat, 06 Apr 2013 08:18:12 -0700 Date: Sat, 6 Apr 2013 08:18:12 -0700 (PDT) From: R10 To: pgsql-jdbc@postgresql.org Message-ID: <1365261492317-5751065.post@n5.nabble.com> Subject: single quotation confusion MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org i am connecting a postgresql database to a netbeans form , and when i try to execute a query which includes a string entered through a Jtextfield that contain the special charachter " ' " it reads it as a single quotation for example if a String txt = "it's cold" and to be inserted into a sql query "insert into test values ('"+txt+"')"; it gives me syntax error at or near "s" any ideas how to solve that problem ?? -- View this message in context: http://postgresql.1045698.n5.nabble.com/single-quotation-confusion-tp5751065.html Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc