Examples: GetRowStatus method
This button example displays the status of the current row. 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 Click(Source As Button)
Dim msg As String
Select Case result.GetRowStatus
Case DB_UNCHANGED : msg = _
"No change - same as on database"
Case DB_ALTERED : msg = "Changed by SetValue"
Case DB_UPDATED : msg = "UpdateRow has occurred"
Case DB_DELETED : msg = "Deleted by DeleteRow"
Case DB_NEWROW : msg = "New row awaiting SetValue"
End Select
Messagebox msg,, "Current row status"
End Sub