我想在.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
答案 0 :(得分: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
答案 1 :(得分:0)
什么对我有用:将键声明为对象数组。
Dim keys(0 To 1) As Object
keys(0) = "asdf"
keys(1) = "sgdk"
...