Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Locate
Fri, May 14 2010 1:36 PMPermanent Link

Yavuz Ozdemir

GEMAS A.S.

Hi,

I used ElevateDb 2.03 Build 12 (Ansi).

I have a table with 3 integer fields and 3 indexes:
 primary index on A,B,C fields
 byAC index on A and C fields
 byCB index on C and B fields

set  table's indexfieldnames property to "A;B;C"  
execute locate('A',123,[])

when I try to run locate function, table can not locate on first record which include 123.

Why can't I locate first record?

example image attached.

Thanks

Yavuz



Attachments: locate_result.jpg
Fri, May 14 2010 2:08 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Yavuz


Its probably doing exactly what you asked it to do. Locate the first record in index A which has the value 9534. If you alter the indexfieldnames to just 'A' what is the sequence?

I have a similar problem but with people being shown in surname;forename order where Smith,David could have been entered before Smith,Alan. What I do is a two stage process. First a query that does SELECT _ID FROM Contacts WHERE _ID = 'Smith' ORDER BY _Forename and then Locate('_ID',query.fieldbyname(_ID').Asinteger,[]). Naturally its a parameterised query. It also gets a bit more complex because users can enter things like Smi,A

Roy Lambert [Team Elevate]
Mon, May 17 2010 4:23 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Yavuz,

<< when I try to run locate function, table can not locate on first record
which include 123. >>

Your attached image seems to show that EDB is finding the correct row for
the Locate.   Perhaps you could show an example that fits what you're
describing better ?

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