0
我已經創建了一個宏,它將從蓮花筆記中提取數據,它工作正常。現在發生的事情是,蓮花筆記的服務器名稱已被更改,並且我的宏無法支持新服務器。不確定嗎?它給了我一個在searchCount上的錯誤。請看一看?我給你的新舊代碼請建議,如果我失去了一些東西。蓮花筆記數據庫路徑
OLD CODE:
Set nSess = CreateObject("Lotus.NotesSession")
DSN1 = ("Driver={Lotus NotesSQL Driver (*.nsf)};Server=OLDSERVER Capital Markets;Database=Notes_DBs/GMI_CoreTrack/mlctrack.nsf;Uid=" & myUsername & ";Pwd=" & myPassword & ";")
Call nSess.Initialize(myPassword)
Set db = nSess.GetDatabase("OLDSERVER", "Notes_DBs/GMI_CoreTrack/mlctrack.nsf")
Set iviews = db.GetView("QA\QA Schedule")
strSearchKeyIssue = "FIELD AQAExecDate >= " & StartDate & " AND FIELD AQAExecDate <= " & EndDate
searchCount = iviews.FTSearch(strSearchKeyIssue, 0)
Set viewEntry = iviews.GetFirstDocument
NEW CODE:
Set nSess = CreateObject("Lotus.NotesSession")
DSN1 = ("Driver={Lotus NotesSQL Driver (*.nsf)};Server=NEWSERVER;Database=GMI\mlctrack.nsf;Uid=" & myUsername & ";Pwd=" & myPassword & ";")
Call nSess.Initialize(myPassword)
Set db = nSess.GetDatabase("NEWSERVER", "GMI\mlctrack.nsf")
Set iviews = db.GetView("QA\QA Schedule")
strSearchKeyIssue = "FIELD AQAExecDate >= " & StartDate & " AND FIELD AQAExecDate <= " & EndDate
searchCount = iviews.FTSearch(strSearchKeyIssue, 0)
在上面的行獲取錯誤信息:運行時錯誤80040fa0
Set viewEntry = iviews.GetFirstDocument
請檢查數據庫是全文索引在新的服務器? –
如何檢查,因爲這是我公司的蓮花筆記我可能無法檢查。 –
我向我的IT團隊查詢DB是全文索引 –