I
Idea
Доброго времени суток всем! Что-то на меня нашел ступор. Нужно очистить базу данных - удалить все-все-все документы. Я - менеджер базы. Написала кнопочку:
Говорит, что коллекция пустая.
Код:
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim sh As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim piu As String
Dim ppiu As Variant
Dim tmpdoc As NotesDocument
Dim tmpcol As NotesDocumentCollection
Dim selection As String
selection = "@All"
Set db = sh.CurrentDatabase
Set tmpcol = db.Search(selection, Nothing, 0)
Set tmpdoc = tmpcol.GetFirstDocument
Do Until tmpdoc Is Nothing
Set doc = tmpdoc
Set tmpdoc = tmpcol.GetFirstDocument
doc.Remove(True)
ws.ViewRefresh
Loop
End Sub
Говорит, что коллекция пустая.