Как получить доступ к заметкам лотоса просмотреть содержимое в .net с помощью VB - PullRequest
0 голосов
/ 13 декабря 2011

Я хочу получить доступ к содержимому катагоризованного представления заметок лотоса в .net .... может кто-нибудь помочь мне в этом .. Я использую interop.domino.dll.

Dim s As New Domino.NotesSession
Dim txt As String
Dim key() As String = {"abcd", "abcd"}
s.Initialize("")
Dim ldb As New NotesDatabase
ldb = s.GetDatabase("", "", False)
Dim vw As NotesView
vw = ldb.GetView("Project Module Wise Configurable Item")
vw.Refresh()
Dim entry As NotesViewEntry
Dim vc As NotesViewEntryCollection

vc = vw.GetAllEntriesByKey(key, False)
entry = vc.GetFirstEntry
While Not (entry Is Nothing)
     txt = CStr(entry.Item)
     entry = vc.GetNextEntry(entry)
     ListBox1.Items.Add(txt)
End While

Ответы [ 2 ]

0 голосов
/ 19 января 2016

Что сработало для меня: объявление ключа как массива объекта.

Dim keys(0 To 1) As Object
keys(0) = "asdf"
keys(1) = "sgdk"
...
0 голосов
/ 13 декабря 2011

попробовать:

    Dim s As New Domino.NotesSession
    s.Initialize("")

    Dim ldb As New NotesDatabase
    ldb = s.GetDatabase("", "", False)

    Dim vw As NotesView
    vw = ldb.GetView("Project Module Wise Configurable Item")
    vw.Refresh()

    Dim txt As String

    Dim entry As NotesViewEntry
    Dim vc As NotesViewEntryCollection

    'declare the array
' ---- edited -----
    Dim key(1) As variant
'----edited --- 
    key(0) = "abcd"
    key(1) = "abcd"

    'be carefull with the second parameter 'false'
    vc = vw.GetAllEntriesByKey(key, False)
    entry = vc.GetFirstEntry
    While Not (entry Is Nothing)
         txt = CStr(entry.Item)
         entry = vc.GetNextEntry(entry)
         ListBox1.Items.Add(txt)
    End While
...