Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Clipper Visual-Objects > CDX index corru...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 10 Topic 11363 of 11558
Post > Topic >>

CDX index corruption?

by "Bert Bonnemaijers" <h.nospam.bonnemaijers.geenspam@[EMAIL PROTECTED] May 1, 2008 at 04:52 PM

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
 




 10 Posts in Topic:
CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 16:52:31 
Re: CDX index corruption?
"Stephen Quinn"  2008-05-01 15:47:41 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 21:00:09 
Re: CDX index corruption?
D.J.W. van Kooten <pub  2008-05-01 21:33:37 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-01 23:17:54 
Re: CDX index corruption?
"Geoff Schaller"  2008-05-01 23:51:48 
Re: CDX index corruption?
"Stephen Quinn"  2008-05-02 03:28:09 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-02 23:27:43 
Re: CDX index corruption?
Karl Faller <k.faller_  2008-05-03 14:22:23 
Re: CDX index corruption?
"Bert Bonnemaijers&q  2008-05-03 22:46:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 16:29:44 CDT 2008.