Skip to Content

Delete corrupt line in adt table

Hello. Because of a power failure on the server, the ADS from our customer stops working. Because off unexpectedly closing off the ADS one table contains a corrupt line. The records in this line has strange characters and dates in year 25342 ... (See attachment) When I open this table in arc32 and select this line, I've got a 7010 error (file read error). After some times it was possible to select the line in arc32 but deleting was not possible: also error 7010

Repair the table by using the tool ADSFIX didn't also fix the table. The corrupt line was still in the table.

After a few times we renamed the table in arc32. To our surprize the line was deleted :)

Question: is renaming the file in arc32 the solution to delete corrupt lines?

If not: what is the best way to delete such kind off line in a adt-table?

screenshot.png (208.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Oct 02, 2017 at 08:24 PM

    In general we would not expect renaming a table to clear corruption. It is difficult to know what happened for sure.

    It sounds like an index may have been corrupted, resulting in different data in the index and the table. Possibly renaming the table forced a re-index when the table was accessed again.

    Opening the table in Architect and selecting Table > Re-Index may have had the same effect.


    Mike Loop
    Senior Support Engineer
    SAP Product Support

    Add comment
    10|10000 characters needed characters exceeded

    • I've never seen a corrupt index as cause for displaying corrupt data. In cases like this, I usually loop through the table and copy record by record to a new table. Not sure if renaming the table does the same.

  • Jun 16, 2018 at 02:49 AM

    If you can open the table in the Advantage Data Architect then open it. Right-Click on the table and select "Export"...Export to new table.

    Check that "New" table to make sure all the records are there. Then right click on the table with the bad record and select "Empty". Next right click on the table and select "Reindex", then right click on the table and select "Pack". That should clear all the data from the table and empty it. Now, depending on the number of records in the table you can put the data back in the production table as follows:

    Method 1. Open the table you saved into and select all records in the table. Then right-click and select "Copy Records". Now right click on the production table where the records came from and select "Paste Records". All the good records will copy back and the paste function will not copy the bad records. When prompted, just discard the bad records. Now, in the production table check the first and last records. Any bad records that still worked in the fields will be in the beginning or end. You can manually delete those.

    Method 2. When the table has 100's of thousands records do this. Use the advantage backup utility to backup the table. Then write a program that will load records from one table to another by iterating through the fields. I wrote a very involved version that detects how many index fields in the table and loads accordingly. Here is a simple version of the load:

    for x := 0 to BackuptTable.Fields.count - 1 do ProductionTable.Fields[x].asstring := BackuptTable.Fields[x].asstring;

    After you empty,reindex and pack the production table, use your program to load the data back.

    Add comment
    10|10000 characters needed characters exceeded