title: Retrieving data from lotus NotesDatabase using lotusScript
body: <p>I am new in lotusScript and lotus notes. I can retrieve data from database using notesView. Here is path of my lotusScript code for that:</p>
  
  <pre><code>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\" &amp; v.name &amp; ".txt"
          Open FileName$ For Append As fileNum% 
          Write #fileNum% , "////// VIEW NAME:" &amp; v.name &amp; "////////////"
          Set mainDoc = v.GetFirstDocument            
          While Not ( mainDoc Is Nothing )
              Forall i In mainDoc.Items   
                  ss = ss &amp; " " &amp;  i.Name         
              End Forall          
              Write #fileNum% , ss
              Set mainDoc = v.GetNextDocument( mainDoc )          
          Wend    
  
          Close fileNum%  
  End Forall
  </code></pre>
  
  <p>End Sub</p>
  
  <p>I designed sql(relational) table for each notesForms. I was trying to retrieve data using notesForm and store that in corresponding table but I could not do that :(
  Any help is highly appreciated.</p>