Sub Click(Source As Button)
On Error Goto ef
Dim session As New NotesSession
Dim dbNAB As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument, docTemp As NotesDocument
Dim strSearch As String
Set dbNab = session.GetDatabase( "", "")
Call dbNab.Open( "", "names.nsf" )
strSearch = { ( form = "local" | form = "remote" ) & ( Destination = "TEST02.CN.ABB.COM/SRV/ABB" | Destination = "CN=TEST02.CN.ABB.COM//OU=SRV/O=ABB" ) }
Set dc = dbNAB.Search( strSearch, Nothing, 0 )
If dc.count > 0 Then
Set doc = dc.getfirstdocument
With doc
.Destination = "TEST02.CN.ABB.COM/SRV/ABB"
.LanPortName = "TCPIP"
.PortName = "TCPIP"
.OptionalNetworkAddress = "10.138.250.27"
.PhoneNumber = "10.138.250.27"
.Owner = session.username
.documentaccess = "[NetModifier]"
Call .computewithform( True, False )
Call .save( True, True )
Msgbox "Connection document has been updated"
End With
Set doc = dc.GetNextdocument( doc )
Do Until doc Is Nothing
Set docTemp = doc
Set doc = dc.GetNextdocument( doc )
Call docTemp.remove( True )
Loop
Else
Set doc = dbNab.CreateDocument
With doc
.form = "local"
.type = "Connection"
.connectionLocation = "*"
.connectionType = "0"
.Source = "*"
.Destination = "TEST02.CN.ABB.COM/SRV/ABB"
.LanPortName = "TCPIP"
.PortName = "TCPIP"
.OptionalNetworkAddress = "10.138.250.27"
.PhoneNumber = "10.138.250.27"
.Owner = session.username
.documentaccess = "[NetModifier]"
Call .computewithform( True, True )
Call .save( True, True )
End With
Msgbox "Connection document has been created"
End If
Exit Sub
ef:
Msgbox "error is" & Error$ & "”;and in line " & Erl, 16, "Error"
Exit Sub
End Sub
添加服務器鏈接
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
IBM / Lotus Domino 與 WebSphere Portal: 單點登錄
陆君风
2020-02-26 05:21:56
理解 IBM Lotus Domino 郵件數據庫的限額
陆君风
2020-02-26 05:21:56
Notes與SAP數據的互換
陆君风
2020-02-26 05:21:56
適於 IBM Lotus Domino 開發人員的 IBM WebSphere portlet 開發
陆君风
2020-02-26 05:21:56
基於 Lotus Expeditor 6.1 的複合應用開發
陆君风
2020-02-26 05:21:56
在 IBM Lotus Notes 和 Domino 中編寫快速查找代碼
陆君风
2020-02-26 05:21:56
集成 IBM Lotus Domino 和 SAP
陆君风
2020-02-26 05:21:56
Domino V8 在 UNIX/Linux 平臺上的安裝及其常見問題
陆君风
2020-02-26 05:21:56
使用 LEI 將 Domino 附件移至 RDBMS,無需編寫腳本
陆君风
2020-02-26 05:21:56
在 IBM Lotus Expeditor 中構建並部署簡單的 Web 服務資
陆君风
2020-02-26 05:21:56
Lotus 技術點之導出
陆君风
2020-02-26 05:21:56
IBM / Lotus Domino 與 WebSphere Portal: 單點登錄
陆君风
2020-02-26 05:21:56
理解 IBM Lotus Domino 郵件數據庫的限額
陆君风
2020-02-26 05:21:56