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 11:23:58AM Tammi McManus wrote:

I am having a problem with a table. Xlates referencing this table are pulling in a bogus record, when I try to select it (by key because that is null), it isn't there. When I select and list that table, I get a count of 8151, however when I do a count, I get 8152. Any suggestions on how to get rid of this thing without having to do a restore?


At 23 JUL 1998 11:35AM Egbert Poell wrote:

You can enter this record by typing on the TCL level

SELECT "filename" WITH @ID < 1  ENTER

This will select 1 or more records with this one.

Type then :

EDIT  "filename" 

If it is empty you can delete it.

If it comes back immediately you have to look for a problem with relational indexes.

If you want to come back to me please do.

Best regards

Egbert Poell

Revelation consultant

Mecomp Automatisering

Mecomp@xs4all.nl


At 23 JUL 1998 01:03PM Tammi McManus wrote:

No records were returned on the select, so I checked out the relational index. There was a related index in that table, so I went in and removed then rebuilt it, unfortunately the phantom record still remains. Any other recommondations? Thank you.


At 23 JUL 1998 03:30PM Victor Engel wrote:

I doubt that it is a phantom record. Can you give more specifics about the XLATE that is finding the records? Why not trap for the record after the XLATE? AT that point you will have the id, etc.


At 23 JUL 1998 09:02PM Bill Titus wrote:

Egbert is right. The problem lies in the relational index between child and parent records. One child record lacks an id that it should have. Until you enter a valid parent id in the child record or delete it, the problem will persist.

SELECT filename WITH @ID < 1

EDIT filename

Go through the record and locate the field containing the id of the child record. Go to child file and delete the child record or add the proper id of an actual parent record in the appropriate field.


At 24 JUL 1998 04:58PM K Gilfilen wrote:

I am unclear after the discussion whether you eliminated the "NULL" record as a possible cause of the problem. If not, the best way I know of to get rid of them, is to create a small program that reads a null record, and if successful with the read, deletes the record. It would be something like this:

open file to handle then

id="

read record from handle, id then

delete handle, id then

print "success! ":id:" was removed."

end

end

end

if this fails, there may be a record with some other form of bogus id, and you may have to do some sleuthing to find it, such as looping thru the file, printing ids that don't fit a particular format. Once in a while you get a record with value marks in the id, which wreaks havoc on indexes. That usually happens when programmers get sloppy.


At 24 JUL 1998 07:09PM Jeff Blinn wrote:

You can also delete a null record from TCL with:

delete filename "bogus_record_id" ""

You'll get an error message that the first record doesn't exist, and then it will delete the null record if it exists.

Jeff

View this thread on the forum...

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