<GetDocumentByKey> A different value is returned

Hello

I have the serious problem now.

There was a case where the value from which a GetDocumentByKey method differs was returned.

Key is a text. It is not a numerical value.

I Thnik…

This is considered that the timing of the update Index in NotesView is caused.


'First :NotesView object is generated.

Set vw = NotesDatabase.GetView(“SampleView”)

’ The document with Key ‘ABC’ is contained in the entry of SampleView.

’ ------>Suppose that NotesView was updated from another process.(Another Agent)

’ Target document is updated and the entry of NotesView is changed.

’ As a result, the document with Key ‘ABC’ was removed by the entry of SampleView.

'Secound:GetDocumentBykey method called

set doc = vw.GetDocumentByKey(“ABC”)

'The document of key"CDE" which is the next entry is returned.


How is it?

Isn’t there any other information on such a phenomenon?

When returning the value from which GetDocumentByKey differs,I will be troubled very much.

I want to ask your opinion.

Subject: A different value is returned

I tryed exactMatch Parameter,but phenomenon is still the same.

When a different result returns, it is troubled very much.

Although it is O.K. when nothing is returned,

actually different result is returned

Subject: RE: A different value is returned

Use the -notesView.AutoUpdate = False

That way - the view that you are looking at - won’t refresh if someone else modifies it while you are pulling info from it. Be sure to set

notesView.AutoUpdate = True when finished.

Subject: RE: A different value is returned

Thank you for your comment.

My application program is use RunOnServer method in NotesAgentClass.

GetDocumentByKey method is called in this Agent.

This Agent is performs simultaneously from a different machine.

I think that an AutoReload method will be tried.

However, there is only a pointer in the index of a NotesView and I think that a too different document may be returned.

How is it?

I want to ask your opinion.