AbsolutePage Property
RecordCount Property
PROPERTY: Recordset::AbsolutePosition
PositionEnum =
recordsetobject.
AbsolutePosition
recordsetobject.
AbsolutePosition
= PositionEnum
long =
recordsetobject.
AbsolutePosition
recordsetobject.
AbsolutePosition
= long
The
AbsolutePosition
property sets or returns a long value that is the numeric position (ordinal position) of the current record in the
Recordset
object. The
AbsolutePosition
property may also return one of the
PositionEnum
constants. Note that you cannot set this property to any of the
PositionEnum
constants.
This property only points to a position and should not be used to uniquely identify a record, since additions, deletions, sorts and other operations can easily rearrange the contents of a
recordset
.
When you set this property to a position number, you will be moved to the record at the position you have specified. In addition, the
Recordset
cache is reloaded. The records in the cache will now start at the numeric position in the
Recordset
you have specified. The total number of records that can be stored in the cache is set by the
CacheSize
property.
The first record is always numbered one. You can use the
RecordCount
property to determine the total number of records in the
Recordset
.
You can only use this property if it is supported by the provider. You must also be pointing to a valid record when attempting to use this property. If you are not pointing to a valid record, this property will return one of the
PositionEnum
constants which specify the current position of the record pointer in the
Recordset
. You may also need the set the
CursorLocation
property to
adUseClient
since the default for this property is
adUseServer
.
PositionEnum Constants
Constant
Value
Description
adPosBOF
-2
The current record pointer is before the first record at the beginning of the file
adPosEOF
-3
The current record pointer is after the last record at the end of the file
adPosUnknown
-16
The
Recordset
is empty, the current position is unknown, or not supported by the provider
Code (VBScript):
If objRecordset.
AbsolutePosition
= adPosBOF
objRecordset.MoveFirst
End If
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information