Hallo
Habe ein kleines Problem. Mein Modul um CDX Files neu aufzubauen generiert in einem Fall das CDX File aber die Sortierung ist falsch.
Wen ich mit dbAdmin den Index neu aufbaue stimmt es.
Im Anhang das kleine lauffähige Muster. Hoffe alles ist drin
In VO genau gleich, macht den Index aber die Sortierung stimmt nicht.
Gruss
Horst
Falsch sortiert
Moderator: wriedmann
Falsch sortiert
- Attachments
-
- Index.zip
- (7.23 KiB) Downloaded 105 times
-
- Posts: 97
- Joined: Tue Mar 01, 2016 11:50 am
- Location: Germany
Re: Falsch sortiert
Horst,
in VO habe ich diesen Vermerk:
SetAnsi( TRUE ) // after SetNatDLL()!!
Evtl. funktioniert das auch in X#.
HTH
Gerhard
in VO habe ich diesen Vermerk:
SetAnsi( TRUE ) // after SetNatDLL()!!
Evtl. funktioniert das auch in X#.
HTH
Gerhard
Re: Falsch sortiert
Hi Horst,
Can you please explain a bit more on what exactly is wrong with the generated sort order? It seems to be ok here, but I'm probably overlooking something.
Can you please explain a bit more on what exactly is wrong with the generated sort order? It seems to be ok here, but I'm probably overlooking something.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Falsch sortiert
Hallo Gerhard
Habe es probiert, keine Änderung
Hello Chris
I reduzed the code and i added a second DB to sort.
All Files are in the zip file.
Please look on the screenshot (shot2.jpg), there you can see on the left side the DB is not sorted , on the right side its sorted.
I dont know why the DB PV_Module is not sorted. I tryed also a different Field (ModulTyp->shot3.jpg) to sort but doesnt work.
When i say to dbAdmin to recreate the index , it works.
Horst
Habe es probiert, keine Änderung
Hello Chris
I reduzed the code and i added a second DB to sort.
Code: Select all
cPfad := "c:\XIDE\TMP\"
// PV_Module
cFilename := cPfad+"PV_Module"
FErase (String2Psz (cFilename+".cdx"))
odbTmp := dbserver {cFilename,FALSE,FALSE,"DBFCDX"} // ohne DBF
odbTmp:createorder ("PVMODULE",,"HERSTELLER",{|| _field->HERSTELLER})
/* ----------------------*/
// Buchtexte
cFilename := cPfad+"Buchtexte"
FErase (String2Psz (cFilename+".cdx"))
odbTmp := dbserver {cFilename,FALSE,FALSE,"DBFCDX"} // ohne DBF
odbTmp:createorder ("Buch",,"BESCHRIEB",{|| _field->Beschrieb})
Please look on the screenshot (shot2.jpg), there you can see on the left side the DB is not sorted , on the right side its sorted.
I dont know why the DB PV_Module is not sorted. I tryed also a different Field (ModulTyp->shot3.jpg) to sort but doesnt work.
When i say to dbAdmin to recreate the index , it works.
Horst
- Attachments
-
- IndexTest.zip
- (154.83 KiB) Downloaded 97 times
Re: Falsch sortiert
Hi Horst,
Thanks, i see the problem now, it's because the field in some of the records (those that appear on top after reindexing) have a few space characters in front of them. For example the "LG SOLAR" field is actually stored in the dbf as " LG SOLAR". If you remove those spaces from the fields, then the order is correct.
I don't know why dbAdmin does not show the spaces in front of the fields in the browser, but if you try to edit the field (from dbAdmin) then you will see them.
Thanks, i see the problem now, it's because the field in some of the records (those that appear on top after reindexing) have a few space characters in front of them. For example the "LG SOLAR" field is actually stored in the dbf as " LG SOLAR". If you remove those spaces from the fields, then the order is correct.
I don't know why dbAdmin does not show the spaces in front of the fields in the browser, but if you try to edit the field (from dbAdmin) then you will see them.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Re: Falsch sortiert
Hello Chris
Thank you very mutch, i see it now, its a TAB.
Horst
Thank you very mutch, i see it now, its a TAB.
Horst