ADS Index problem solve

ADS Index problem solve

Postby kokookao2007 » Thu Sep 13, 2007 1:37 am

kokoo's problem:

I have a index problem which work in rdd "ADS".
Aa SAMPLE ITEM NO."HST-2000 " SHOULD Sorting in first one , but the
result is in last one.

Same source code work in Rdd "DBFCDX" Was CORRECT .

xHarbour :0.9970
ADS version: 8.1.018



#INCLUDE "FIVEWIN.CH"
#INCLUDE "ADS.CH"

local aDBF

aDbf := {}
AADD(aDbf, { "NO" , "C",20, 0 })

//
DBCREATE(FILE_TH+TEMP , aDbf)

USE &TEMP NEW EXCL ALIAS "ITEM"

ITEM->(DBAPPEND()) ; ITEM->NO:="HST-2000 " //==> should be first
ITEM->(DBAPPEND()) ; ITEM->NO:="HST-2000-01"
ITEM->(DBAPPEND()) ; ITEM->NO:="HST-2000-02"
ITEM->(DBAPPEND()) ; ITEM->NO:="HST-2000-03"
ITEM->(DBAPPEND()) ; ITEM->NO:="HST-2000-04"

INDEX ON ITEM->NO TO (FILE_TH+TEMP)
BROWSE()

// BROWSE SCREEN
NO
===================
HST-2000-01
HST-2000-02
HST-2000-03
HST-2000-04
HST-2000 ==> SHOULD BE FIRST, WHY ?


the Solution from news.devzone.advantagedatabase.com
news://46e75637@solutions.advantagedatabase.com/

Hi,

In some of the collations, the hyphen (-) character sorts in front of the
space character. If you are using ANSI character sets, you can use the
ansichr.exe utility to create a new collation based on your PC's locale.
There is an option "Ignore Symbols" on the dialog where you specify the
collation name. If you check that option, the resulting collation should
have the hyphen collated after the space. If you are using Advantage
Database Server, you will have to stamp the new collation into the server
with the adsstamp.exe utility. If you are using Advantage Local Server, you
specify the name of the language in the adslocal.cfg file
(ANSI_CHAR_SET=...). You should reindex your tables after doing this.

Mark Wilkins
Advantage R&D


kokoo say:

HI Mark :

Thank you for solution .

1)After edit adslocal.cfg ===>ANSI_CHAR_SET=ASCII
2)copy ansi.chr to work directory
3)reindex

It is the sorting what I want now !!





Thanks everyone.

Best Regards
-------------------------------------------------------------
kokoo KAO
User avatar
kokookao2007
 
Posts: 59
Joined: Thu May 17, 2007 8:27 am

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 91 guests