Subject: A change of course…
Hi again Christian,
Sorry, I was a bit mixed up. I think this issue of yours is a quite a bit different from the one that I had been talking about.
In my case the ‘poltergeists’ were definitely parents. In your case, (after re-reading your information) I suspect there may be an inconsistency between the response table and the actual contents of the database itself. In fact, some of your documents have incorrect response table. The response table is a list that helps to let a document know its responses.
What truly decides whether a document is a response or not is the presence of a $REF item. The response list in the parent is just here to help finds the responses of a doc without having to parse the full database.
However, this table can be altered but yet still contain NoteIDs for documents that no longer exist or that have became the response of another doc. If I remember correctly, this is especially true of R5…
So in your case, you’ll perceive that there is a document here (because the reponses property lists it in Lotusscript), but in reality it points to nothing: the document does not exist.
We encountered this situation in some of our databases.
I unfortunately don’t know any way to fix this situation (we tried a lot of different things). As you say, sometime a compact does the trick, sometime it doesn’t.
In Lotusscript, what we did to protect ourselves against this was to do the following every time we parse the list of responses:
Set ndcResp = nd.Responses
If ndcResp.Count > 0 Then
Set ndResp = ndcresp.GetfirstDocument
Do While Not ndResp Is Nothing
If ndresp.isvalid And Not (ndresp.isdeleted) Then ' bcose some responses can stay in the list but are deleted
If ndresp.ParentDocumentUnid = nd.UniversalID Then ' bcose responses table is not always accurate
' Then you can do your stuff here: the response is a valid one...
End If
End If
Set ndResp = ndcResp.GetNextDocument(ndResp)
Loop
End If
If you download the free version of scanEZ ( Getting Started with scanEZ ); open the database in question; click on one of the parent documents in the selection tree, you’ll be able to see any ‘phantom responses’ listed in the parent/response tab. You will see that on a given document with problems, this parent/response tab gives you (for example) 3 responses, but in the list you will see some of the responses are actually deleted or non-existent (a big error string will be given, instead of the list of the items for the response document)…
In the case of an empty parent, the document exists (you can open it using scanEZ or anything else), but is completely empty (not a single item inside).
Have a great weekend,
Peter