Examples: IsResultSetAvailable method
This agent executes an SQL query and displays the column number, name, and size of each field in the result set.
Uselsx "*LSXODBC"
Sub Initialize
Dim con As New ODBCConnection
Dim qry As New ODBCQuery
Dim result As New ODBCResultSet
Dim lastName As String
Set qry.Connection = con
Set result.Query = qry
con.ConnectTo("ATDB")
lastName = Inputbox$("Last name?", "Query")
qry.SQL = _
"SELECT * FROM STUDENTS WHERE LASTNAME = _
""" & lastName & """"
result.Execute
If result.IsResultSetAvailable Then
Messagebox lastName & " exists in STUDENTS"
Else
Messagebox lastName & " does not exist in STUDENTS"
End If
result.Close(DB_CLOSE)
con.Disconnect
End Sub