LOTUS CONNECTORS
Uselsx "*LSXODBC"
Sub Postopen(Source As Notesuidocument) Set con = New ODBCConnection Set qry = New ODBCQuery Set result = New ODBCResultSet Set qry.Connection = con Set result.Query = qry End Sub
Sub Click(Source As Button) Dim firstName As String Dim lastName As String Dim msg As String con.ConnectTo("ATDB") qry.UseRowID = True qry.SQL = "SELECT * FROM STUDENTS" result.Execute msg = "Student names:" & Chr(10) Do result.NextRow firstName = result.GetValue("FIRSTNAME", firstName) lastName = result.GetValue("LASTNAME", lastName) msg = msg & Chr(10) & firstName & " " & lastName Loop Until result.IsEndOfData Messagebox msg,, "Student names" result.Close(DB_CLOSE) con.Disconnect End Sub
See Also