Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Set doc = view.GetNextDocument (doc) gives entry not found in index error

733 views
Skip to first unread message

Tayfun Arli

unread,
Nov 2, 1999, 3:00:00 AM11/2/99
to
Can anyone help please,

I have this agent which loops through a view to process documents, but it
errors out every one or two documents saying

error 4005 entry not found in index ("view name")

this is the script:

set view = db.getview("viewname")
set doc = view.getfirstdocument
while not (doc is nothing)

(runs some of my subs and functions on the document)
mysub1
myfunction1
mysub2

set doc = view.getnextdocument(doc) 'this is the line I get the error
on
wend

appreciate someones help
Tayfun


Kai

unread,
Nov 2, 1999, 3:00:00 AM11/2/99
to
What happens in the subs and functions you call?
A typical failure: You update some values in the current document, so
that the current document is no longer member of the view, e.g. when
you delete the document. Maybe this is your problem?

raymond...@intentia.com.au

unread,
Nov 3, 1999, 3:00:00 AM11/3/99
to
hi,

do your subs do something that would remove the document from the view? or
reallocate the doc variable to another document?


add 1 line, modify 1 line

set view = db.getview("viewname")
set doc = view.getfirstdocument
while not (doc is nothing)

set ndoc = view.getnextdocument(doc) <-- add this line

(runs some of my subs and functions on the document)
mysub1
myfunction1
mysub2

set doc = ndoc <-- modify this line
wend

Mike Graham

unread,
Nov 3, 1999, 3:00:00 AM11/3/99
to
Your subs must be doing something to move or remove the document in the
view. Get the next doc in a temp doc before doing anything to the current
one, see inserted lines below.

Tayfun Arli <tay...@tayfun-arli.com> wrote in message
news:BUxT3.26080$5P2.62533@wards...


> Can anyone help please,
>
> I have this agent which loops through a view to process documents, but it
> errors out every one or two documents saying
>
> error 4005 entry not found in index ("view name")
>
> this is the script:
>

> set view = db.getview("viewname")
> set doc = view.getfirstdocument
> while not (doc is nothing)

set doc2 = view.GetNextDocument(doc)


>
> (runs some of my subs and functions on the document)
> mysub1
> myfunction1
> mysub2
>

> set doc = view.getnextdocument(doc) 'this is the line I get the
error

' instead of the above line:
set doc = doc2

0 new messages