Trapping index errors

jda jda at his.com
Sun Dec 19 12:24:11 CST 2004


I'm finding that index damage is the most common form of db 
corruption. I'd like to trap for that when opening a database and 
automatically rebuild the indexes.

I have a db with an index error of 537857 ($83501) -- Inventory 
corrupted for index "%S".

I've tried trapping for a number of different EVErrors, and even

if theError.ErrorNumber >= EVError.IndexByteReclistCorrupted and 
theError.ErrorNumber <= EVError.IndexPageInventoryCorrupted then...

but can't catch it.

I can of course trap for the error number I've given, but I'd like a 
more general solution.

Ruslan, what enumerated constants would you suggest I use to trap for 
repairable index errors?

Thanks,

Jon


More information about the Valentina-beta mailing list