Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread Case insensitive filters with DBISAM
Wed, Sep 14 2011 3:26 AMPermanent Link

Paul Coshott

Avatar

Hi All,

DBISAM 4.29b4 with Delphi 2009.

I have a table with a primary key and a description field (and many other fields). The description field has an index on it and it is case insensitive. In the filter options, I set foCaseInsensitive to True.

If the table had the following :

Stock ID          Description
---------           -----------
1234                50 Angle White Al
1245                51 Angle white al
1266                52 Angle WHITE al

If I then set a filter such as :

Description Like '%white%'

The only match that results is Stock ID 1245. If I have set foCaseInsensitive to True, then why doesn't it match all of the above?

Cheers,
Paul
Wed, Sep 14 2011 5:24 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul

From my fading memory of DBISAM try

UPPER(Description) Like UPPER('%white%')

Roy Lambert [Team Elevate]


Wed, Sep 14 2011 5:35 AMPermanent Link

Paul Coshott

Avatar

UPPER(Description) Like UPPER('%white%')

Hi Roy,

yes I know I can do that, but what does the foCaseInsensitive property do? I am using DevExpress's filter control, and it does not have the ability to automatically add in the Upper, so I was hoping by setting foCaseInsensitive to True on the table component, it would treat the filter as if the Upper was being used.

Any ideas?

Cheers,
Paul
Wed, Sep 14 2011 6:09 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Paul

>yes I know I can do that, but what does the foCaseInsensitive property do? I am using DevExpress's filter control, and it does not have the ability to automatically add in the Upper, so I was hoping by setting foCaseInsensitive to True on the table component, it would treat the filter as if the Upper was being used.

That's a totally different question Smiley If you search the newsgroups for foCaseInsensitive you'll find some information which basically boils down to foCaseInsensitive only works for some on the operators. Tim's given a couple of different replies but the most recent say it only works for =

I've never even seen DevEx's filter control so can't comment about it apart from to say that if it specifically offers support for DBISAM I'd ask then why they don't do it and if not you'll need to find some way to alter the code before its used.

Roy Lambert [Team Elevate]
Mon, Sep 19 2011 11:15 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< The only match that results is Stock ID 1245. If I have set
foCaseInsensitive to True, then why doesn't it match all of the above? >>

The foCaseInsensitive option only works for the basic =, <>, >=, <=,
operators, and not for the extended operators like LIKE, IN, etc.

--
Tim Young
Elevate Software
www.elevatesoft.com
Image