Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread using locate with locaseinsensitive option
Sun, Mar 9 2008 4:39 PMPermanent Link

"keith crusius"
t1.locate('name',aName,[locaseinsensitive])

Does the above statement work with any text column index or do i have to
specify a certain type of collation to be able to search using the
loCaseInsensitive option?  Or will it work but not be optimized without the
CI collation?  Sorry, i'm still a little fuzzy about the collation concepts.
Thanks.
Mon, Mar 10 2008 3:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

keith


I think the answer is you're confusing Delphi & SQL Smiley IF there is a case insensitive index it will be used, if not I'm not sure what will happen.

Roy Lambert
Mon, Mar 10 2008 8:41 AMPermanent Link

"keith crusius"
Does not the EDBEngine ultimately translate my delphi code to SQL commands
for results?  It certainly has to make use (or not make use) of whatever
indexes you have defined.  Thanks.

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:A921CF4C-26CF-4644-94AE-FD8998645C28@news.elevatesoft.com...
> keith
>
>
> I think the answer is you're confusing Delphi & SQL Smiley IF there is a
> case insensitive index it will be used, if not I'm not sure what will
> happen.
>
> Roy Lambert
>
Mon, Mar 10 2008 10:08 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

keith

>Does not the EDBEngine ultimately translate my delphi code to SQL commands
>for results?

No idea. But reading Tim's manual I see that ElevateDB will try the current index/locate options first and if they don't match then see if there is an index. If not it does a table scan so back to your original question "Does the above statement work with any text column index" the answer is yes.


>It certainly has to make use (or not make use) of whatever
>indexes you have defined.

Why. It may use sql to find out what indices exist but there's no reason why Tim can't use the same code for a locate that he uses WITHIN the sql but without using sql. Its easy to loose sight (I know I do) of the fact that sql is just another language that has to be translated into instructions that do something and there's no reason why the same instructions can't be arrived at from another route.

Roy Lambert


Mon, Mar 10 2008 10:43 AMPermanent Link

"keith crusius"
Yes, I had lost sight of SQL being just another programming language.

"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:F75BC35C-2C3A-484B-B319-DC7012DCB747@news.elevatesoft.com...
> Why. It may use sql to find out what indices exist but there's no reason
> why Tim can't use the same code for a locate that he uses WITHIN the sql
> but without using sql. Its easy to loose sight (I know I do) of the fact
> that sql is just another language that has to be translated into
> instructions that do something and there's no reason why the same
> instructions can't be arrived at from another route.
>
> Roy Lambert
>
>
>
Mon, Mar 10 2008 4:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Keith,

<< Does the above statement work with any text column index or do i have to
specify a certain type of collation to be able to search using the
loCaseInsensitive option?  Or will it work but not be optimized without the
CI collation?  Sorry, i'm still a little fuzzy about the collation concepts.
>>

No problem, this type of thing gets a little complicated.  The way it will
work is this:

1) If an index exists that both contains the search column *and* has a
case-insensitive collation assigned to the indexed column, then that index
will be used to execute an optimized locate.

2) Otherwise, the search will be executed using a brute-force row scan with
a case-insensitive comparison on the search column.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image