EacapeString and Like search

Erne ernestogiannotta at tiscalinet.it
Mon May 29 00:28:05 CDT 2006


Thanx!

On 28-mag-06, at 22:06, Ruslan Zasukhin wrote:

> On 5/28/06 9:43 PM, "Erne" <ernestogiannotta at tiscalinet.it> wrote:
>
> Hi Erne,
>
>> making some test I want to find this text:
>>
>>    a'\s
>>
>> so I pass it to Valentina.EscapeString and I get:
>>
>>    a\'\\s
>>
>> seems correct to me but if I search
>>
>>    Like '%a\'\\s%'
>>
>> I get no match (seems wrong to me)
>
> No, this is correct answer.
>
>> so I input
>>
>>    a'\\s
>>
>> and pass it to Valentina.EscapeString and get:
>>
>>    a\'\\\\s
>>
>> again it's correct to me but when I do search:
>>
>>    Like '%a\'\\\\s%'
>>
>> I get match with a'\s (and again it seems wrong to me, I should get
>> no match here)
>
> Why you think it is wrong?
>
> Let's think in next way. You have some function
>
>     DoLike( str1, patternStr ) as boolean
>
> You need use next pattern
>
>     DoLike( "a'\s", "a'\\s" )   => true
>
> Right?
>
> In your case complexity comes that you need do 2 kinds of escape
>     1) for Like itself
>     2) for SQL parser.  >> this job to ValentinaEscape
>
>
> -- 
> 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

Cool Runnings,
Erne.

/ |\ |\  | /
– |/ | \ | –
\ |\ |  \| \



More information about the Valentina mailing list