Re: Single quote instead of double?

From: Oguz Imre <maccube(at)comcast(dot)net>
To: vernonw(at)gatewaytech(dot)com
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Single quote instead of double?
Date: 2003-03-15 22:21:57
Message-ID: 88F23276-5734-11D7-94F9-003065A215CC@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thanks for your swift response.

You are suggesting that after I create the query string, I edit it to
substitute single quote with double, then execute the query. I agree
this is a trivial solution, I wanted to know if there is an elegant
way, say by some switches or something...

Have a nice day.

On Saturday, March 15, 2003, at 01:35 PM, Vernon Wu wrote:

> You need to pad a backslash in front of the apostrophe, or double up
> the apostrophe. Here is an example code:
>
> int k=0;
> while((k = src.indexOf("'", k)) >= 0) {
> src = src.substring(0, k) + "\\" + src.substring(k);
> k += 2;
> }
> return src;
> *
>
> 15/03/2003 10:28:10 AM, Oguz Imre <maccube(at)comcast(dot)net> wrote:
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oguz Imre 2003-03-15 22:26:07 Past Single quote instead of double? But there's more
Previous Message Vernon Wu 2003-03-15 18:35:08 Re: Single quote instead of double?