How to access other notes database view via lotuscript

I have following code:

Dim session As New NotesSession

Dim ws As New NotesUIWorkspace

Dim db As NotesDatabase

Dim doc As NotesDocument

Dim view As NotesView

Dim entry As NotesViewEntry

Set db = session.CurrentDatabase

Set uidoc = ws.currentDocument

Set doc = uidoc.Document

Set view = db.GetView(“JR Routing/InsType”)

Set vc = view.GetAllEntriesByKey(Institution(0)&requestType(0))

For x=1 To vc.Count

Set entry = vc.getNthEntry(x)

alevel = entry.ColumnValues(4)

custodian = entry.ColumnValues(5)

assigner = entry.ColumnValues(6)

Next x

I can access current database view and columnvalues via the above code, but how can i access view and clumnvalues from other notes database in other server?

could anybody give me some code example?

thanks in advance!

Subject: Quite similar

Hi Oct,instead of

set db = session.currentDatabase

you say

set db = new NotesDatabase(“server”,“filename”)

… and the rest is the same …

One remark on your code: AGetNthEntry is very slow, so you migh want to code:

set entry = vc.getfirstentry

do until entry is nothing

… your code here

set entry = vc.getnextentry(entry)

end do

That should be faster

Hth

:slight_smile: stw

Subject: RE: Quite similar

thank you very much!