V4MD escape apostrophe
info at vallemediatime.com
info at vallemediatime.com
Sun Jun 19 23:09:10 CDT 2005
Hi Ruslan,
thanks for your answer.
But I have a more complex problem: for search a string the user of my app
can click in a cell of grid (I use cXtraStringGrid), the string cell is
automatically send in field "searchString" and after start the search query.
I can't preview if surname have an apostrophe... and where is it.
I need of a solution for all strings that have an apostrophe in some place.
After your answer I suppose that it is necessary to create a loop for get
the apostrophe position and after start the query con a variable escape
position.
But other member how do it if the searchString is variable?
Paolo
----- Original Message -----
From: "Ruslan Zasukhin" <sunshine at public.kherson.ua>
To: <valentina at lists.macserve.net>
Sent: Sunday, June 19, 2005 10:15 PM
Subject: Re: V4MD escape apostrophe
> On 6/19/05 1:55 PM, "info at vallemediatime.com" <info at vallemediatime.com>
> wrote:
>
> > Hi all
> >
> > If I search a string like "DALL'OSTO" I get this:
> > ERROR: ERR_SQL_PARSER_ERROR(line 1:1: unsexpected token:DALL)
>
> LIKE 'string'
>
> Must be single quotes
> And you need escape quote:
>
> LIKE 'DALL\'OSTO'
>
>
> > my query is:
> > query = "SELECT RecID, * from" && gTableName &&\
> > "WHERE '" & searchString & "' IN" && member("fieldNameList").text
> > gCursor = gDb.sqlSelect(query, #kServer, gLockType, #kRandom)
> >
> > I read in the docs that is necessary to ESCAPE the apostrophe,
> > but I don't know how to insert the ESCAPE expression in my query.
>
> For this you can use Valentina.EscapeString() method
>
> > Can somebody help me, please?
> >
> > Sorry if the question is old for others members list...
>
> --
> Best regards,
>
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
>
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
>
> [I feel the need: the need for speed]
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.7.8/22 - Release Date: 17/06/2005
>
>
More information about the Valentina
mailing list