Eof Method
Checks if the current position of the cursor is at the end of the
RecordSet.
Syntax
Object.Eof
Arguments - Object: Required. Always the name of ADODB
RecordSet object
Returns
True if the current position of the cursor is not at the end of the
RecordSet otherwise False
Remarks
The following example illustrates the use of the Eof method.
Example 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