Re: how to Escape single quotes with PreparedStatment

From: JavaNoobie <vivek(dot)mv(at)enzentech(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: how to Escape single quotes with PreparedStatment
Date: 2011-08-22 08:14:34
Message-ID: 1314000874022-4722528.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,
I tried that example but it threw an error as follows.
org.postgresql.util.PSQLException: ERROR: syntax error at or near "%"
Position: 158
at
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)

Why could this be happening?

--
View this message in context: http://postgresql.1045698.n5.nabble.com/how-to-Escape-single-quotes-with-PreparedStatment-tp4718287p4722528.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Andrew Hastie 2011-08-22 09:47:29 Re: how to Escape single quotes with PreparedStatment
Previous Message ml-tb 2011-08-22 07:46:37 Re: how to Escape single quotes with PreparedStatment