2011-12-13 5 views
0

.net.에서 lotu notes의 논란보기의 내용에 액세스하고 싶습니다. 이것에 관해서 도와 줄 수 있습니다 .. interop.domino를 사용하고 있습니다. dll.VB에서 로터스 노트에 액세스하는 방법 VB에서

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

@duizendstra 감사를 요청 ...... 그것은 (라인 VC = vw.GetAllEntriesByKey에 오류가 있습니다 키, 거짓) 데이터를 가져 오지 않습니다 ... 내 코드가 맞습니까? –

+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 
+0

잘못된 변수 유형입니다. (HRESULT 예외 : 0x80020008 (DISP_E_BADVARTYPE)) 같은 줄에 "vc = vw.GetAllEntriesByKey (key, False)" –

+0

위의 코드는 무엇입니까? –

+0

예 위의 코드로 오류가 발생했습니다 –

0

.

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