Metodo Eof

Verifica se la posizione corrente del cursore si trova alla fine dell'oggetto RecordSet.

Sintassi

Object.Eof

Argomenti - Object: obbligatorio. Sempre il nome dell'oggetto ADODB.RecordSet.

Valore restituito

True se la posizione corrente del cursore non si trova alla fine dell'oggetto RecordSet, in caso contrario False.

Note

Nell'esempio seguente viene illustrato l'uso del metodo Eof.

Esempio 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