0
我是lotusScript和蓮花筆記中的新手。我可以使用notesView從數據庫檢索數據。下面是針對我的LotusScript代碼路徑:使用lotusScript從lotus NotesDatabase檢索數據
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
末次
我設計的SQL(關係)表中的每個notesForms。我試圖用notesForm檢索數據並存儲在相應的表格,但我不能這樣做:( 任何幫助,高度讚賞。
您將不得不發佈無法使用的代碼以及您遇到的錯誤 - 此時,此問題看起來像您希望有人在您的內部循環中編寫代碼。 – 2010-10-04 10:45:52
你到底想要完成什麼? Notes文檔和關係數據庫表中的行之間很少有簡單的一對一映射(除非您對關係數據庫的理解存在嚴重錯誤)。如果您需要企業數據同步,那麼您應該查看Lotus Enterprise Integrator for Domino或Notrix等產品。 – 2010-10-04 10:55:08
@Jonners:感謝您的快速回復。我在這裏發佈了我的整個代碼,我想用notesForm來做同樣的事情。 – 2010-10-04 10:57:13