首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用NotesDatabase从lotusScript检索数据

问使用NotesDatabase从lotusScript检索数据
EN

Stack Overflow用户
提问于 2010-10-04 10:38:57
回答 1查看 2.9K关注 0票数 0

我是新来的lotusScript和莲花音符。我可以使用notesView从数据库中检索数据。下面是我的lotusScript代码的路径:

代码语言:javascript
复制
Sub getViewData
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim mainDoc As NotesDocument    

    Set db = session.CurrentDatabase
    Dim collection As NotesDocumentCollection
    Set collection = db.AllDocuments

    Dim fileName As String
    Dim fileNum As Integer

    Dim item As NotesItem   

Forall  v In db.Views

        Set mainDoc = v.GetFirstDocument    
        fileNum% = Freefile()
        fileName$ = "C:\AllViewsData\" & v.name & ".txt"
        Open FileName$ For Append As fileNum% 
        Write #fileNum% , "////// VIEW NAME:" & v.name & "////////////"
        Set mainDoc = v.GetFirstDocument            
        While Not ( mainDoc Is Nothing )
            Forall i In mainDoc.Items   
                ss = ss & " " &  i.Name         
            End Forall          
            Write #fileNum% , ss
            Set mainDoc = v.GetNextDocument( mainDoc )          
        Wend    

        Close fileNum%  
End Forall

结束子对象

我为每个notesForms设计了sql(关系)表。我试图使用notesForm检索数据并将其存储在相应的表中,但我无法做到这一点:(非常感谢任何帮助。

EN

回答 1

Stack Overflow用户

发布于 2010-10-07 08:11:17

窗体描述数据的架构/ UI。实际需要导出/查询的是数据库中的Lotus 文档,而不是表单。

至于视图,这些只是数据的“窗口”,不需要显式导出。这里有一篇与你类似的文章,我的答案涵盖了数据、表单和视图之间的区别:

How to get the underlying view of a form using lotusscript

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3854415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档