[LotusScript] 簽認資料庫
1 代理 DB簽認
Sub Initialize
On Error Goto ErrHandler
Dim systemview As NotesView
Dim systemdoc As NotesDocument
Set s = New NotesSession
Set db=s.CurrentDatabase
Dim SearchFormula As String
totalnum=0
RefreshInfo=""
theInstantV = Now
Set EmpDB=s.getdatabase(db.Server,"SYSTEM\\UGOP.nsf")
Set EmpOldView= EmpDB.GetView("(ByOldEName)")
Set DBView = db.getView("Vw_APList")
Set DBDC = DBView.AllEntries
Set DBDE= DBDC.GetFirstEntry( )
While Not(DBDE Is Nothing)
Set DBDoc = DBDE.Document
Set refreshDB = s.GetDatabase(DBDoc.ServerIp(0),DBDoc.ApPath(0))
serverName = DBDoc.ServerName(0)
apNames = apNames +serverName
Call refreshDB.sign(DBSIGN_DOC_ALL)
Call DBDoc.replaceitemvalue("phase2","Y")
Call DBDoc.Save(True,False)
Set DBDE= DBDC.GetNextEntry(DBDE)
Print totalnum
totalnum = totalnum + 1
Wend
Messagebox Cstr(totalnum)
'錯誤處理
Set mdoc=db.createdocument
Set rtitem=New notesrichtextitem(mdoc,"Body")
mdoc.Form="memo"
Dim adminmail(0)
adminmail(0) ="With Wang/CN/CMINL@CMINL"
mdoc.sendto=adminmail
mdoc.subject=Cstr(Today)+" Domain Change Phase(SignACL)"+"For ALL"
ErrorMsg = apNames +" OK !"+ ErrorMsg
ErrorMsg="執行時間 From:"+ theInstantV+Chr(13)+ErrorMsg
ErrorMsg="執行時間 To:"+ Cstr(Now)+Chr(13)+ErrorMsg
ErrorMsg="已更新DB :"+Chr(13)+ErrorMsg
ErrorMsg="已處理"+Cstr(totalnum)+"筆資料"+Chr(13)+ErrorMsg
Call rtitem.AppendText( ErrorMsg )
Call rtitem.AddNewline(3)
Call rtitem.AppendText(RefreshInfo)
mdoc.send(True)
Print "更新Acl結束~!"
Exit Sub
ErrHandler:
ErrorMsg=ErrorMsg+Chr(13)+serverName+ "[Error #" & Cstr(Err) & "]: " + Error$ + Cstr(Erl())
Resume Next
End Sub
2 Function UserNames
Function UserNames (Action As String, Username As Variant) As String
Dim InputName As New NotesNAME(Username)
Action=Ucase(Action)
Select Case Action
Case "[CANONICAL]"
UserNames=InputName.Canonical
Case "[ABBREVIATE]"
UserNames=InputName.Abbreviated
Case "[CN]"
UserNames=InputName.Common
Case "[C]"
UserNames=InputName.Country
Case "[OU1]"
UserNames=InputName.OrgUnit1
Case "[OU2]"
UserNames=InputName.OrgUnit2
Case "[OU3]"
UserNames=InputName.OrgUnit3
Case "[O]"
UserNames=InputName.Organization
Case Else
UserNames=InputName.Canonical
End Select
End Function
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24998103/viewspace-700381/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【MySQL資料庫】認識資料庫+環境搭建--------Windows系統MySql資料庫Windows
- CAS配置資料庫,實現資料庫使用者認證資料庫
- 1.6. 資料庫管理員認證資料庫
- 一張圖認識天下資料庫資料庫
- 時序資料庫 TDengine 簽約新奧新智資料庫
- Oracle RMAN 連線資料庫認證方法Oracle資料庫
- 1.4. 認識你的資料庫版本號資料庫
- 資料庫物件資訊記錄表|全方位認識 mysql 系統庫資料庫物件MySql
- 資料庫週刊41丨9月資料庫排行榜;資料庫簽約專案盤點;2020 資料技術嘉年華活動預告…資料庫
- 資料庫週刊44丨10月國產資料庫排行;openGauss 1.0.1釋出;國產資料庫認證考試指南…資料庫
- MongoDB資料庫授權認證的實現JRMYMongoDB資料庫
- [20230306]os認證連線資料庫問題.txt資料庫
- 時序資料庫 TDengine 簽約華銳技術,助力行情資料處理分析資料庫
- 資料庫介紹--認識簡單的SQL語句資料庫SQL
- REST API簽名認證機制RESTAPI
- 如何進行UEFI簽名認證
- 1.6.4.3. 使用作業系統認證連線資料庫作業系統資料庫
- PostgreSQL資料庫PGCM高階認證考試經驗分享SQL資料庫GC
- 資料庫PostrageSQL-管理資料庫資料庫SQL
- KubeBlocks完成阿里雲PolarDB資料庫產品生態整合認證BloC阿里資料庫
- 全方位認識HBase:一個值得擁有的NoSQL資料庫(一)SQL資料庫
- 資料分析基礎—3.1 認識資料
- 【資料庫資料恢復】SAP資料庫資料恢復案例資料庫資料恢復
- 【資料庫資料恢復】MS SQL資料庫附加資料庫出錯怎麼恢復資料?資料庫資料恢復SQL
- 入選國際資料庫頂級會議ICDE,騰訊雲資料庫技術創新獲權威認可資料庫
- 資料庫介紹--初識資料庫資料庫
- 資料庫 資料庫的完整性資料庫
- 資料湖 vs 倉庫 vs 資料庫資料庫
- 資料庫概論 (一)資料庫概念資料庫
- 【Falsk 使用資料庫】---- 資料庫基本操作資料庫
- 時序資料庫 TDengine 簽約中冶京誠,助力鋼鐵工業智慧化資料庫
- OceanBase 資料庫認證專員 OBCA 上線啦!報名認證考試限時免費資料庫
- 【資料庫資料恢復】Sql Server資料庫資料恢復案例資料庫資料恢復SQLServer
- DataX將MySql資料庫資料同步到Oracle資料庫MySql資料庫Oracle
- KubeBlocks 完成阿里雲 PolarDB 資料庫產品生態整合認證啦!BloC阿里資料庫
- 國外資料庫十大風雲人物,你認識幾個?資料庫
- 達夢資料庫DM8-DCP認證專家培訓影片資料庫
- 【資料結構篇】認識資料結構資料結構
- 織夢資料庫_織夢還原資料庫_織夢資料庫很卡資料庫