Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 23 JUL 1998 01:07:15PM Tammi McManus wrote:

I tried the select option first and got 'no records found'. I then looked up the indexing information and found a related index. I went to that table and removed and rebuilt the relational index, unfortunately the phantom record still remains. If I am required to restore the table, do I restore both the one containing the phantom record and the one containing the related index? Thanks for your assistance.


At 23 JUL 1998 08:16PM Matt Sorrell wrote:

Tammi,

Don't mean to intrude on your conversation, but I had a problem like this one time. It took forever to find it, but what it turned out to be was an @ID that had a delimiter in it. Sounds strange, but it happens.

The way I finally got rid of it was to write a little program that looks basically like this:

OPEN "", TO IN.FILE

CLEARSELECT

EOF=0

SELECT IN.FILE

LOOP

   READNEXT ID ELSE EOF=1

UNTIL EOF

   READ IN.REC FROM IN.FILE,ID THEN
        CNT=FIELDCOUNT(ID,@VM)
        IF CNT=1 THEN CNT=FIELDCOUNT(ID,@SVM)
        IF CNT GT 1 THEN DELETE IN.FILE,ID
   END

REPEAT

STOP

This should find it if there is one out there. Another problem I had that was causing the same problem was if there was a space in the @ID. For that, I did the same as above, but instead of using fieldcount, I used the INDEX function, as follows:

IX=INDEX(ID,' ',1)

IF IX THEN DELETE IN.FILE,ID

Hope this helps. Naturally both tests can be incorporated into one program.

Depending on the size of the file, this can take a while to run. You'll also have to remove and completely rebuild your indexes after this, if anything is delete, because delimiters in an @ID will really whack out an index.

Oh, yeah, almost forgot. To know if you deleted anything, just set a flag the call MSG if the flag is set. Or, if you want to see what the @ID looked like, just WRITEV the @ID to a table. I use LISTS, another programmer at the office uses TEMP.

Anyway, hope this helps.

Matt

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/ff376874c7c7b0978525664a005e0c52.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1