SQL search should require escaped characters, no?

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Nov 25 20:07:09 CST 2004


On 11/25/04 7:58 PM, "jda" <jda at his.com> wrote:

Hi Jon,

> In b28 I find that
> 
> select * from myTable where title='a.b.c'
> 
> finds a record with a.b.c in the title field.
> 
> I thought it should fail (and was using 'a\.b\.c' as the search
> string, which didn't work). In contrast, the same search done as
> REGEX requires the periods to be escaped.
> 
> This seems inconsistent -- I thought you always had to escape strings in SQL.

1) you always need EscapeString() using parameter inForRegEx = false.

    in this mode only SINGLE QUOTE and BACK SLASH will be escaped.
    so DOT will not be escaped.

2) for REGEX search the DOT (and other chars) will be escapped


> Is this a bug I should report?

This is not a bug.

> Jon
> 
> P.S. Happy Thanksgiving everyone (where ever you are)!

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------




More information about the Valentina-beta mailing list