LOTUS CONNECTORS


Examples: IsValueNull method
This script executes when a field is entered and displays a message if the result set column with the same name is null. The form that contains the button contains other scripts that declare global variables, load the result set, and process the result set. The global declarations and a portion of the Postopen script are shown.

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 ORDER BY LASTNAME"
 result.Execute
 ...
End Sub

Sub Entering(Source As Field)
 Dim workspace As New NotesUIWorkspace
 Dim uidoc As NotesUIDocument
 Set uidoc = workspace.CurrentDocument
 If result.IsValueNull(uidoc.CurrentField) Then
   Messagebox "This field is null",, "Null field"
 End If
End Sub

See Also