LOTUS CONNECTORS
Uselsx "*LSXODBC"
Dim con As ODBCConnection Dim qry As ODBCQuery Dim result As ODBCResultSet 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 con.ConnectTo("ATDB") qry.SQL = "SELECT * FROM STUDENTS WHERE " & _ "LASTNAME = ?lastName? AND FIRSTNAME = ?firstName?" End Sub Sub Click(Source As Button) Dim inputParameter As String For i = 1 To result.NumParameters inputParameter = Inputbox$(result.GetParameterName(i), _ "Parameter " & i) Call result.SetParameter(i, "'" _ & inputParameter & "'") Next End Sub Sub Queryclose(Source As Notesuidocument, Continue As Variant) result.Close(DB_CLOSE) con.Disconnect End Sub
See Also