Move Method
MoveLast Method
MoveNext Method
MovePrevious Method
METHOD: Recordset::MoveFirst
recordsetobject.
MoveFirst
The
MoveFirst
method is called to move to the first record in the specified
Recordset
object.
If the current record has been modified and an
Update
has not been performed, then when you call
MoveFirst
, there will also be an implicit call to
Update
for the current record. If you do not wish to keep the changes to the current record, then you should call
CancelUpdate
before you call
MoveFirst
.
If the
Recordset
is using a forward only cursor, it is possible that the provider will re-execute the command that originally created the
Recordset
which will automatically place the current record pointer to the first record. Potentially, this could be a very time-consuming process.
This is one of four methods belonging to the
Recordset
object that allow you to navigate or move through a data record. The other three are
MoveLast
,
MoveNext
, and
MovePrevious
.
Code (VBScript):
varBookMark = rsChantList.Bookmark
rsChantList.
MoveFirst
rsChantList.Find "ChantName = 'Oma' "
If (objRecordset.EOF = True) Then
MsgBox "Record not found"
rsChantList.Bookmark = varBookMark
End If
RDS allows the
Recordset
object to be bound to an HTML tag so that the data can be displayed on a web page. You can use four buttons on a Web page to navigate through a displayed recordset. When a button is clicked, a subroutine containing one of the four move methods is called:
Code (VBScript):
Sub MoveFirst_OnClick
objDataControl.objRecordset.
MoveFirst
End Sub
Sub MoveLast_OnClick
objDataControl.objRecordset.MoveLast
End Sub
Sub MoveNext_OnClick
If objRecordset.EOF = False Then
objDataControl.objRecordset.MoveNext
End If
End Sub
Sub MovePrevious_OnClick
If objRecordset.BOF = False Then
objDataControl.objRecordset.MovePrevious
End If
End Sub
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information