Skip to main content

ADODB in LotusScript

Remember to use TRIM function when comparing data in two recordsets in LotusScript.


  • After an ADO Database Connection has been created, create the Recordset.  
  • Proceed to extract, transform and/or load your data. 
  •  
This is an example of appending data to a recordset. In this case from SQL to DB2.
====================================================================
 Do While Not SQLRS.EOF And Not Db2RS.EOF And Not Done
        dubugthis = "Inside update"
        record = Trim(Db2RS("YourID").Value) & " - " & Trim(projRS("YourOtherID").Value)
        Print record  
        If Trim(Db2RS("YourID").Value) = Trim(projRS("YourOtherID").Value) Then
            Db2RS.MoveNext
            projRS.MoveNext
                        num1 = num1 + 1
        Else
            Done = True
        End If
        If Not SQLRS.EOF And Db2RS.EOF then
            Done = True
        Else
        End If
    Loop
====================================================================

From here, once "Done" is true you can begin processing, copying, or appending your data using the appropriate counter until SQLRS.EOF is true.


Comments