Re: Single quote instead of double? - Mailing list pgsql-jdbc

From Oguz Imre
Subject Re: Single quote instead of double?
Date
Msg-id 88F23276-5734-11D7-94F9-003065A215CC@comcast.net
Whole thread Raw
In response to Re: Single quote instead of double?  (Vernon Wu <vernonw@gatewaytech.com>)
List 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@comcast.net> wrote:
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


pgsql-jdbc by date:

Previous
From: Vernon Wu
Date:
Subject: Re: Single quote instead of double?
Next
From: Oguz Imre
Date:
Subject: Past Single quote instead of double? But there's more