PROPERTY:  Recordset::EOF

Boolean = recordsetobject.EOF

The EOF property returns a Boolean value that indicates if the current position in a Recordset object is just after the last record. If True, you are at EOF. If False, you are at or before the last record, but still inside the Recordset.

The companion BOF property returns a Boolean value that indicates if the current position in a Recordset object is just before the first record. If both the BOF and EOF properties are True, then there are no records in the Recordset.

If you are at EOF, then you should not call the MoveNext method. If you do, an error will be generated since there cannot be a next record.

Code (VBScript):
If (objRecordset.EOF = True) Then
   objRecordset.Close
End If

Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information