如何使用VB访问.net中的Lotus Notes查看内容

发布于 2024-12-20 17:11:12 字数 630 浏览 2 评论 0原文

我想访问 .net 中 Lotus Notes 分类视图的内容...有人可以帮助我解决这个问题吗..我正在使用 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

I want to access contents of a catagorized view of lotu notes in .net.... can some one help me regarding this.. I am using 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

韶华倾负 2024-12-27 17:11:12

尝试:

    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

try:

    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
千里故人稀 2024-12-27 17:11:12

对我有用的:将键声明为对象数组。

Dim keys(0 To 1) As Object
keys(0) = "asdf"
keys(1) = "sgdk"
...

What worked for me: Declaring key as array of object.

Dim keys(0 To 1) As Object
keys(0) = "asdf"
keys(1) = "sgdk"
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文