Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Database maintenance
Message
From
03/12/2002 05:19:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Database maintenance
Miscellaneous
Thread ID:
00728921
Message ID:
00728921
Views:
51
Hello all,

i'm trying to find a reliable way to correct index problems:

e.g.

table test in database foo

TRY
use test in 0
CATCH oError WHEN oError.ErrorNo = 114 && the index is corrupt
pseudocode: copy file oldfunctioningemptycdxfile to newcdx
use test in 0
alter table test drop primary key
delete tag all

alter table test alter column pk_bla I NOT NULL PRIMARY KEY
INDEX ON field1 TAG tag1 and so on .. rebuilding all
CATCH oError WHEN oError.ErrorNo = 1707 && Index file not found

the same as above .. but sometimes a messagebox pops up (arg .. i hate this errors that generate UI ... kick them all forever!! .. ),
is there a way around this?

CATCH oError WHEN oError.ErrorNo = 1567 && Primary key in database incorrect
?? validate database is not good (cause of required user interaction)
how could someone fix this one?

CATCH oError WHEN oError.ErrorNo = 1561 && DBC is corrupt
?? the same as above ..


ENDTRY

sometimes the first CATCH works nice .. but i can't get it to work reliable, keep getting the 1567 :((

please advise on how to solve this issues,
i've found no good documentation on how to solve such things ..

P.S. no i don't have the option to use e.g. Stonefield Database Toolkit (i would like to, but my chef has another opinion on this one ..)

Regards

Christian
Next
Reply
Map
View

Click here to load this message in the networking platform