Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recreate cdx files again
Message
From
04/12/2002 07:21:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Recreate cdx files again
Miscellaneous
Thread ID:
00729371
Message ID:
00729371
Views:
110
Hello,

since nobody answered my post from yesterday i'll ask it again

how would one recreate indexes when the indexfile gets corrupted:
e.g.

TRY
USE someTable IN 0 SHARED
CATCH TO oError WHEN oError.ErrorNo = 114 && the Index is corrupted
COPY FILE (oldEmptyFunctioningCdxFromSomeTable.cdx) TO (someTable.cdx)
ALTER TABLE DROP PRIMARY KEY
DELETE TAG ALL

ALTER TABLE someTable ADD PRIMARY KEY pk_foo TAG pk_foo
INDEX ON bla TAG bla && rebuild all Index's
RETRY
CATCH TO oError WHEN oError.ErrorNo = 1707 && CDX file is missing
&& the same as on Error 114
CATCH TO oError WHEN oError.ErrorNo = 1567 && Primary Key Prop of DBC wrong
&& how do i get rid of this one?
CATCH TO oError WHEN oError.ErrorNo = 1561 && DBC corrupt !?
&& i guess the only solution to this is copy in a backup of the original DBC
&& is this correct?
ENDTRY

the reindexing works fine, but i keep getting Error 1567 which i don't know how to get rid off ..

thx for any tips to correctly handle such a situation

Regards

Christian
Next
Reply
Map
View

Click here to load this message in the networking platform