Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Michael Hagl" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: Wrong Sort Order of Index Date: Fri, 25 Aug 2017 15:14:18 +0200 Lines: 94 Message-ID: References: <505743cc-e730-4a81-a725-3679086c7d59@googlegroups.com> X-Trace: individual.net 0keMWGM3RzT63qr2yXeXRAy14CtdUeRBuzK+v9NudIClCBcxgQ Cancel-Lock: sha1:/vKhs2fSpogn80ZMncYStdlr4MQ= X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Original Xref: csiph.com comp.lang.clipper.visual-objects:10938 Hi, I have done some tests. When change collation to ADS_ANSI "AdsSetCharType(ADS_ANSI)" and do a reindex, I get the same result with wrong sorting order and unwanted seek result. Maybe the ads sorting order can be changed by function AdsSetCollation(), see ADS help file? Michael Hagl "Jürgen Knauf" schrieb im Newsbeitrag news:505743cc-e730-4a81-a725-3679086c7d59@googlegroups.com... Am Freitag, 25. August 2017 12:58:47 UTC+2 schrieb Karl-Heinz: > Hi Michael, > > > I have do some tests: (ADS-12, OEM- und ANSI-Character Set is setting to > > GERMAN),l but xHarbour > > i made a small VO-Test. Depending on that code i get these results: > > FUNCTION Start() > LOCAL oDB AS DBServer > LOCAL cPfad AS STRING > > > // makes no differences if sortorder.dbf ist a OEM-Dbf or not > > // SetCollation ( #windows ) > SetCollation ( #clipper ) > > RddSetDefault ( "DBFCDX" ) > > cPfad := "D:\test\" > > > IF File ( cPfad + "SOrtorder.cdx" ) > FErase ( cPfad + "SOrtorder.cdx" ) > > ENDIF > > oDB:= DbServer { cPfad + "SOrtorder.dbf" } > oDB:Createorder ( "OrderID", cPfad + "SOrtorder.cdx", "Upper(ID)" ) > > oDB:Close() > > RETURN NIL > > > #clipper > > aaa > aaa-bab > aaa-bbc > aaa-bcb > abc > abd > > > #Windows > > aaa-bab > aaa-bbc > aaa-bcb > aaa > abc > abd > > But there might be another problem.No matter if the index is created using > #clipper or #windows a seek shouldn´t fail. Maybe later on, after creating > the index, Jürgen switches from #windows to #clipper ? Didn´t try that, > but > i guess that a seek fails - maybe not always - in such cases ? > > regards > Karl-Heinz I tried with SetCollation(#CLIPPER). But the same problem. Search: cSuche = "aaaa" lFound := oglServer:Seek(Upper(cSuche)) result: lFound => true found record => aaa-bab It only works with oglServer:Seek(PadR(Upper(cSuche),30)).