Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Double quote in sql request

2 posts in Delphi Last posting was on 2012-07-18 14:06:06.0Z
Alain JEan Posted on 2012-07-18 12:19:58.0Z
From: "Alain JEan" <alain.jean@i2a.info>
Newsgroups: advantage.delphi
Subject: Double quote in sql request
Date: Wed, 18 Jul 2012 14:19:58 +0200
Lines: 13
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5843
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.255.33.93
Message-ID: <5006a9de@solutions.advantagedatabase.com>
X-Trace: 18 Jul 2012 05:19:42 -0700, 81.255.33.93
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25859
Article PK: 1109436

Good Morning,

I have a erreur with a request using doubleQuote

SELECT * FROM TABLE WHERE FIELD = 'A "B" C'

When i execute this request in dataArchitech it running but with the Delphi
componant the system send a error message "expecting semicolon".

thank you
Alain


Edgar Sherman Posted on 2012-07-18 14:06:06.0Z
Date: Wed, 18 Jul 2012 08:06:06 -0600
From: Edgar Sherman <no@email.com>
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
MIME-Version: 1.0
Newsgroups: advantage.delphi
Subject: Re: Double quote in sql request
References: <5006a9de@solutions.advantagedatabase.com>
In-Reply-To: <5006a9de@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 10.6.193.121
Message-ID: <5006c2b6@solutions.advantagedatabase.com>
X-Trace: 18 Jul 2012 07:05:42 -0700, 10.6.193.121
Lines: 23
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25861
Article PK: 1109441

How are you setting the query in the application?

If in code, you may need to double up the single quotes

AdsQuery1.SQL.Add('SELECT * FROM TABLE WHERE FIELD = ''A "B" C''';

Edgar

On 7/18/2012 6:19 AM, Alain JEan wrote:
> Good Morning,
>
> I have a erreur with a request using doubleQuote
>
> SELECT * FROM TABLE WHERE FIELD = 'A "B" C'
>
> When i execute this request in dataArchitech it running but with the Delphi
> componant the system send a error message "expecting semicolon".
>
> thank you
> Alain
>
>