0
votes

in lotus notes 6.5 is there a method to check if a document is open by a users to avoid the document replication conflict ?

now to resolve this problem i'm doing this in the queryopen of every document:

    Dim doc As NotesDocument
    Set doc=source.Document
    doc.opened="yes"    
    Call doc.Save(True,False)   

and in the queryclose:

    Dim doc As NotesDocument    
    Set doc=source.Document
    doc.opened="no"
    Call doc.Save(True,False)

and i check that field to know if the document is open or not. Is there another solution to do this ?

1
That solution won't work if there are replicas of the database.Richard Schwartz
And what's yuor advice ?Michele De Nardi
My advice is to follow Torsten's advice.. But there really are no 100% foolproof solutions to rep/save conflicts. All you can do is minimize them.Richard Schwartz

1 Answers

2
votes

This is a typical case for "Document locking". Just enable it in the database- properties, and you don't need even one line of code, it will simply work.

Unfortunately you use an "ancient" software (Software is from 2003, End of Support was in April 2010) and there the document locking was a new feature and had some "glitches":

Documents may stay locked, although nobody is editing them anymore. But you can easily fix that manually (an admin can right- click and unlock documents) or via nightly agent:

If doc.Lockholders(0) <> "" then call doc.unlock()

In the newer Versions of IBM Notes (formerly known as Lotus Notes) the locking is much more stable, you should really think about updating...