title: how to save form values to DB in domino designer by Lotus Script
body: <p>I am new to Domino designer and lotus script,</p>
  
  <p>following my <a href="https://stackoverflow.com/questions/28050641/how-to-access-textfield-value-in-lotus-script-for-domino-designer">first question</a></p>
  
  <blockquote>
    <p>1) How can I save form values to DB</p>
    
    <p>2)How can I view DB( like MS access)</p>
    
    <p>3) How to create view to retrieve values from DB</p>
  </blockquote>
  
  <p>Googled for it but found a link <a href="http://www-01.ibm.com/support/knowledgecenter/SSVRGU_9.0.1/com.ibm.designer.domino.main.doc/H_EXAMPLES_SAVE_METHOD_DOC.html?lang=en" rel="nofollow noreferrer">to save to db</a> solution.</p>
  
  <p>I tried</p>
  
  <pre><code>Sub Click(Source As Button)
      Dim  myText As String
      Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim  enteredText As String
  
      Dim session As New NotesSession
      Dim db As NotesDatabase
  
      Set db = session.CurrentDatabase
      Set doc = New NotesDocument( db )
      doc.Form = "Main Topic"
      doc.Subject = "Here's a new document"
      Call doc.Save( False, False )//I think it is saving here but don'y know where it saves
  
      myText = Inputbox("insert some text :","Testing Heading","Default value",100,100)
      Msgbox "you have entered : "+myText 
      Set uidoc = workspace.CurrentDocument
      Set doc = uidoc.Document
      doc.addrfield = myText
  
      enteredText = doc.addrfield(0)
      Msgbox "Data entered in addrfield : "+ enteredText 
  End Sub
  </code></pre>
  
  <blockquote>
    <p>But I don't know where it is saving my form fields</p>
  </blockquote>
  
  <p>If possible please provide links to sites where DB and view are discussed along with codes.</p>
  
  <p>Thanks in advance  </p>
  
  <p>The above one is solved! Thanks Knut</p>
  
  <blockquote>
    <p>Edit 1:</p>
  </blockquote>
  
  <p>I want to create a Java agent which will  generate a text file (create a simple report) of the data in the database .</p>
  
  <blockquote>
    <p>How can I add Java Agent ?  How can I get access data(form fields) in
    the database ? Where should I place the java code?</p>
  </blockquote>