General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Recreate cdx files again
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only