Verifica se o cursor está no final de RecordSet.
Sintaxe
Object.Eof
Argumentos - Object: Obrigatório. Sempre o nome do objeto ADODB RecordSet
Retorna
Retornará True se a posição atual do cursor não estiver no final do RecordSet; caso contrário, retornará False
Comentários
O exemplo a seguir ilustra o uso do método Eof.
Exemplo 1:
'Create ADODB.Connection Object
Dim ConnObj ' Create a variable.
Set ConnObj = CreateObject("ADODB.Connection")
ConnObj.Open("ConnectionString") 'Creates DB Connection by Using Connection String
Dim RecSetObj
Dim CmdTxt
CmdTxt = "SELECT * FROM EMPLOYEE_DETAILS WHERE ID = 101"
Set RecSetObj = ConnObj.Execute(CmdTxt) 'Returns RecordSet
If Not RecSetObj.Eof Then
'Fetch the Column Value from the Record Set Object
End If
RecSetObj.Close()
ConnObj.Close()
Set RecSetObj = Nothing
Set ConnObj = Nothing