jump to article
...intermittent thoughts

Attachment found on more than one document

currently I'm involved in a the update of a bigger Notesdatabase, requiring to rename richtext items on Notes documents. So the first thing I did was to learn how to move one Item into another name on a Notes document. (yes, there is no rename method in the Lotusscript NotesDocument class). This part should have been easy:

get the Item, copy it into a new one with the desired target name, delete the old one.

That was the first time when I had several documents throwing the Message: Document has been found on more than one document. So I looked a bit at google, looked into the Error resources of Domino and got nothing really helpful. One described to having the problem when moving rich text items having attachements on the same document. Well, that's it - all the documents causing trouble at my database have attachments. So I tried another way:

create a new document - copy all items to the new document, save both documents, go through all the items on the new document and copy them back to the old document. If you get a field named $file leave it out since it will be created by the corresponding Richtext field and will contain the Attachments on the recentyl copied richtext fields.

Even though this algorithm is much more longer than the first one - it does not work! the same Documents are still making problems by poping up the messagbox during NotesDocument.save()

My solution is now to include a subform on the new document form having richtext fields named like the old ones plus all the new fields, open this document in the UI, and move the content of those fields into the new content fields manually! What a fun - I had to process some 1600 documents, 31 were corrupt and had to be done by hand - 25 of that 31 are bigger than 10 MB. Since the database has a size of 4.5 Gig - I don't have a local replica at the moment - processng that documents takes plenty of time, even if you have a speedy DSL line.

But what is making me really nervous - I have still some 1000 documents to analyze. They are of a different doctype which has changed too and need to be migrated the same way - I'm afraid I will have some more fun with this nasty error message....

Anyone was having this too? Any better solutions? Your comment is appreciated.

Amazing

My Firefox is running now again. It was "just" a complete reinstall - including the deletion of my personally stored profile data, the reinstallation of all extensions and the remigration of my bookmarks which I forgot to synch to my bookmarks storage before...