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
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
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