Can Domino connect, pull and push SQL server data using ADO?
There is not a specific connector for ADO (ActiveX Data Object) you can use the standard ODBC (Lotus Script Data Object--LS:DO) or NotesPump. The code example below was garnered from some NotesNet responses from Cristian Muraru. If you need more information, check the Microsoft Knowledge Base for ADO with VB. This should be easy to adapt to LotusScript.
Dim Connect As Variant Dim RecordSet As Variant Dim Qry As String Dim TableName As String Dim i As Long TableName="A" Set Connect = CreateObject("ADODB.Connection.2.5") Connect.ConnectionString ="DSN=XX" Connect.Open Qry="SELECT * FROM [" & TableName &"]" Set RecordSet = CreateObject("ADODB.Recordset.2.5") RecordSet.Open Qry, Connect,2 , 1 RecordSet.MoveFirst i=0 While Not RecordSet.Eof i=i+1 Print Cstr(i) & " -> " & RecordSet.Fields(aField).Value RecordSet.MoveNext Wend
Dig Deeper on Domino Resources - Part 4
Related Q&A from Brian Mahoney
Find out what types of calculations can be computed for a column in a Lotus Notes view and the best way to go about it with this expert response. Continue Reading
Find out why you can't use Formula language to include a doclink to a specific Lotus Notes view or database and need to use LotusScript instead. Continue Reading
SearchDomino.com's expert Brian Mahoney explains how to work around the default replication and form parameters of profile documents, so that the ... Continue Reading