0

.net の lotu ノートの分類されたビューの内容にアクセスしたいのですが、これに関して誰か助けてくれませんか.. 私は 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
4

2 に答える 2

0

試す:

    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
于 2011-12-13T10:28:28.503 に答える