Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Primary key index not ordering data
Tue, May 20 2008 9:25 AMPermanent Link

Praveen A B
Hi,

Using ElevateDB 1.05B2.
Requirement is for displaying data in alphabetical order in dblookupcombobox.
Say, I have a table 'CUSTOMERS'. The primary key index 'PRIMARY' COLLATE ANSI_CI ASC is on field 'cust_code'.

Table values
cust_code
------------
AAA
BBB
aaa

In the lookup box the list is seen in the same order as above.
When I create another index 'DROPDOWN' COLLATE ANSI_CI ASC on cust_code and assign
LookupDataSet.IndexName := 'DROPDOWN', then the lookup list is order correctly as below.

DBLookup list with 'DROPDOWN' index
--------------------------------------------
aaa
AAA
BBB

Why does this happen ? Why isn't primary key index ordering the data ?

Thanks
Praveen
Tue, May 20 2008 10:14 AMPermanent Link

"Jose Eduardo Helminsky"
Praveen

> Using ElevateDB 1.05B2.

My suggestion is to upgrade to 1.09B3 before any further information.

Eduardo

Tue, May 20 2008 12:09 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Praveen,

In addition to Eduardo's recommendation, you should try a table repair
because if "cust_code" is case-insensitive and is the only column in the
primary key, it's very strange you can have the values 'AAA' and 'aaa'
in the column!

--
Fernando Dias
[Team Elevate]
Image