Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Hi,  I have a lotus notes web application with form fields for user input.  I want to load the field values into xml and then insert the values from the XML file into a DB2 database using lotusscript.

Posted on 2008-11-18
2
Medium Priority
?
555 Views
Last Modified: 2013-12-18
Hi,  I have a lotus notes web application with form fields for user input.  I want to load the field values into xml and then insert the values from the XML file into a DB2 database using lotusscript.
0
Comment
Question by:SatishDhote
1 Comment
 
LVL 5

Accepted Solution

by:
mekhet30 earned 2000 total points
ID: 22985570
Hi

You can use the following code to create an HTML file locally.  I'm sure you can just change the HTML tags to XML

Sub Click(Source As Button)

       Dim Session As New NotesSession
      Dim ws As New NotesUIWorkspace
      Dim thisdB As NotesDatabase
      Dim ThisUIDoc As NotesUIDocument
      Dim ThisDoc As NotesDocument
      Dim OfficeDoc As NotesDocument
      Dim OfficeView As NotesView
      
      Set thisdb = session.CurrentDatabase
      Set ThisUIDoc = ws.CurrentDocument
      
      
      
      Set ThisDoc = ThisUIDoc.Document

field1 = ThisDoc.field1
field2 = ThisDoc.field2
field3 = ThisDoc.field3
field4 = ThisDoc.field4
field5 = ThisDoc.field5
      ' Create a file
      Dim text As String
      Dim fileNum2 As Integer
      fileNum2% = Freefile()
      
      FileLocation = "c:\XML\"
      
      
      FilePath = FileLocation & "export.xml"
      
      Open FilePath For Output As fileNum2%            
      
      
      Print #filenum2% , "<html> "
      
      Print #filenum2% , "<body>"
      
      Print #filenum2% , "<table border=0 width="300">"
      Print #filenum2% , "<tr>"
      Print #filenum2% , {<td width="200">}
      Print #filenum2% , {<p style="margin-top: 0; margin-bottom: 0">}
      Print #filenum2% , {T: } & field1(0) & "<br>"
      Print #filenum2% , {F: } & field2(0)&"<br>"
      Print #filenum2% , {F: } & field3(0)&"<br>"
      Print #filenum2% , {F: } & field4(0)&"<br>"
      Print #filenum2% , {F: } & field5(0)&"<br>"
      Print #filenum2% , "</tr>"
      Print #filenum2% , "<tr>"
      Print #filenum2% , {<td width="200">}
      Print #filenum2% , {<img border="0" src="} & uselogo & """ width="195" height="68"></td>"
      Print #filenum2% , "</tr>"
      Print #filenum2% , "</table>"
      Print #filenum2% , "</body>"
      Print #filenum2% , "</html>"
      
      
'Close the file
      Close fileNum2%
End Sub
      

You can atually "speak" directly with the DB2 database via Lotus Script.  This is supported from R8.  I'm sure there are other ways also to write code that will access the DB2 database directly.

Cheers
      
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question