2

我正在维护一个处理来自 Lotus Notes 数据库的消息的旧版 VB6 应用程序。从 NotesDatabase 的一个实例中,我们获得了一个 NotesDocumentCollection 并因此遍历消息:

Set domCollection = domDatabase.AllDocuments
Set domDocument = domCollection.GetFirstDocument
'Do something with domDocument
Set domDocument = domCollection.GetNextDocument
'Continue until no more documents

我的问题:是否有可能知道使用 GetFirstDocument 和 GetNextDocument 方法返回文档的顺序是什么?

谢谢!

4

1 回答 1

7

创建的NotesDocumentCollection例如 fromAllDocuments是未排序的。如果您查看顺序,您可能会发现文档按创建顺序显示。但是不能保证这一点,而且无论如何也大多没有帮助。

如果您需要排序的文档列表,请使用NotesViewEntryCollection排序视图。

如果您只需要文档中的某些字段,请将它们全部放在视图的列中并使用entry.ColumnValues. 通过这种方式,您可以获得比阅读每个文档更高的性能。

于 2013-05-21T20:41:30.400 回答