locked
corrupt table RRS feed

  • Question

  • i face trouble when the table is corrupted

    is there a prg file when discover when the table corrupt will repair this table automatic without any external application or user

    Saturday, July 30, 2011 9:13 AM

Answers

  • i write a code and the trouble is solven

    set tablevalidate to 0

    use table1 excutive

    goto bottom

    delete

    pack

    use

    and it's working ok

    • Marked as answer by Alaa Mukhtar Saturday, July 30, 2011 5:23 PM
    Saturday, July 30, 2011 5:20 PM

All replies

  • There are several routeins and third party products, eg FoxFix. But nothing can guarantee a repair without data loss. Backup is a prominent strategy against file corruptions ;).

    The most often error is a bad reccount in the header, either because the count really is just wrong or a new record was not successfully appended at the end of the file. A simple solution to that is USE table / APPEND BLANK or INSERT INTO Table... That also means it's often not detected and a self repairing incident in a normal application adding data.

    Take a look into SET TABLEVALIDATION to give you an idea what you need to set to allow VFP to open such a corrupted table.

    Third party tools are able to fix corrupt Memo files, too and ammend other corruptions in DBFs, but often for the price of lost records. A Backup makes you loose all data since that backup, but it's a plannable loss of data and you know what you lost, after a fix you're not aware of loosing a middle part of a data, are you? So actually I don't think very much of repair tools, unless they do report what parts they needed to wipe. They are really helpful for repairing SCX, VCX etc, which are actually also data, but a backup can't be replaced by a repair tool.

    Bye, Olaf.

    • Proposed as answer by Naomi N Sunday, July 31, 2011 6:36 AM
    Saturday, July 30, 2011 10:05 AM
  • i write a code and the trouble is solven

    set tablevalidate to 0

    use table1 excutive

    goto bottom

    delete

    pack

    use

    and it's working ok

    • Marked as answer by Alaa Mukhtar Saturday, July 30, 2011 5:23 PM
    Saturday, July 30, 2011 5:20 PM