vb6 - Domino.NotesDocument Collection - 集合中项目的顺序是什么?

标签 vb6 lotus-notes lotus-domino

我正在维护一个处理来自 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 方法返回文档的顺序是什么?

谢谢!

最佳答案

NotesDocumentCollection 创建,例如AllDocuments 未排序。如果查看顺序,您可能会发现文档按创建顺序出现。但这并不能保证,而且大多也无济于事。

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

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

关于vb6 - Domino.NotesDocument Collection - 集合中项目的顺序是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16678449/

相关文章:

excel - 如何在我的 Excel 文件中找到特定数据,例如日期,然后使用 VB 6.0 在其旁边的列上写入时间?

C# 如何使用 Interop.Domino.dll 在 Lotus Notes 中获取字段的属性(字段类型、默认值、公式等)

Java代理显示动态生成的图形?

java - 如何在xpages中读取Java中的css文件

java.security.AccessControlException : Access denied (java. lang.RuntimePermission 首选项)

vb6 - Visual Basic 6 中的折叠/折叠函数和子例程

vba - 如何将 COM 公开的 .NET 项目添加到 VB6(或 VBA)引用对话框?

vb6 - 无法在运行时读取属性

lotus-notes - 通过JAVA应用程序连接远程DOMINO服务器时出现异常

lotus-notes - 为 "reply to all with history"创建 Lotus Notes 热键/快捷键