Hi folks,
Again thanks for your help, all of you!
I have a few remarks:
Building indexes with multiple orders went well. I kept the old indexfile
names as ordernames. So the editing on the program was minimal, because
all
the SetOrder()-statements didn't need to be changed.
In the DB-editor I deleted the indexes; they are useless, because in the
DB-editor I couldn't create multple orders.
Now everything works fine. Instead of 16 indexfiles there are now 5.
Greetings
Bert Bonnemaijers
"Bert Bonnemaijers" <h.nospam.bonnemaijers.geenspam@[EMAIL PROTECTED]
>
schreef in bericht news:4819d930$0$24414$5fc3050@[EMAIL PROTECTED]
> Hi all,
>
> I have problems with CDX-indexes.
>
> First of all I have a file INGREDIENT.DBF created with the DB-server
> editor
> of VO 2.6. In the DB-editor I defined the CDX-driver. Together with the
> creation of the DBF-file, two indexes were created: Ing_IngNr.CDX and
> Ing_Ingred.CDX. Ing_Ingr.DCX belongs to a numeric field called "IngrNr".
> Ing_Ingred.CDX belongs to a character field called "Ingredient".
>
> So far so good. Using and testing gave no problems. The indexes work
fine,
> can be opened and appending, editing and deleting data gives the normal
> predictable results.
>
> But....
>
> When I want to build the indexes again with INDEX ON, or
DBCreateIndex(),
> the index file Ing_ingred.CDX cannot be used in a normal way anymore. It
> looks like the other works wall, although I'm not completely sure of it.
>
> I made sure that I delete the index files before building the index,
like
> I read in this NG.
>
> This is the (test)code:
>
> Ctrl1:=FErase(confdefDir+"INg_IngNr.CDX")
> Ctrl2:=FErase(confdefDir+"INg_Ingred.CDX")
>
> DBUSEAREA(TRUE, "DBFCDX", "INGREDIENT",,TRUE)
>
> DBCREATEINDEX("Ing_IngNr","INGRNR",{||INGREDIENT->INGRNR})
> DBCREATEINDEX("Ing_Ingred","INGREDIENT",{||INGREDIENT->INGREDIENT})
>
> INGREDIENT->DBCLOSEAREA()
>
> In an empty datafile, created bij the DB-editor, the size of the
> indexfiles is as follows
>
> Ing_IngNr.CDX 3072 bytes
> Ing_Ingred.CDX 3072 bytes
>
> Now, when I im****t records of a testdatabase the sizes are:
>
> Ing_IngNr.CDX 5120 bytes
> Ing_Ingred.CDX 10240 bytes
>
> At this point everthing goes well, the indexes work as they should, no
> problems occurred.
>
> When I build the indexes again with the code as above the sizes are:
>
> Ing_IngNr.CDX 5120 bytes
> Ing_Ingred.CDX 7168 bytes
>
> So there's a difference in filesize. After the building of the
indexfiles
> it looks like there's less information in the indexfile. I cannot see
why
> there is a difference in those files of wrhy the indexes behave
> differently. Is the index corrupt or am I forgetting something?
>
> Greetings
>
> Bert Bonnemaijers
>
>
>
>
>


|