Object | Recordset Rs.movenext to move the record pointer down one row from the current position
Rs.moveprevious move the record pointer up one row from the current position
Rs.movefirst move the record pointer to the first row of the datasheet
Rs.movelast move the record pointer to the last row of the datasheet
Rs.absoluteposition=n move the record pointer to the nth row of the datasheet
Rs.absolutepage=n move the record pointer to the first row of page N
Rs.pagesize=n set every page to N records
Rs.pagecount returns the total number of pages based on pagesize settings
Rs.recordcount returns the total number of records
RS.BOF returns whether the record pointer is over the first end of the datasheet, True indicates Yes, FALSE is no
Rs.eof returns whether the record pointer is over the end of the datasheet, True indicates Yes, FALSE is no
Rs.delete deletes the current record, but the record pointer does not move down
Rs.addnew add records to the end of the datasheet
Rs.update Update datasheet Record
--------------------------------------------------------------
Recordset Object Methods
Open method
Recordset. Open source,activeconnection,cursortype,locktype,options
Source
The Recordset object can connect to the command object through the Source property. The source parameter can be a command object name, a section of SQL command, a specified data table name, or a stored Procedure. If this argument is omitted, the system takes the source property of the Recordset object.
ActiveConnection
The Recordset object can connect connection objects by ActiveConnection properties. The ActiveConnection can be a connection object or a string parameter containing the database connection information (ConnectionString).
CursorType
The CursorType parameter of the Recordset object Open method indicates what cursor type will start the data, including adOpenForwardOnly, adOpenKeyset, adOpenDynamic, and adOpenStatic. It is described as follows:
--------------------------------------------------------------
Constant??????????????????????????????? Constant value????????????? ? description
--------------------------------------------------------------
adOpenForwardOnly???????? 0?????????????????????? The default value, starting a cursor that can only be moved forward (Forward only).
adOpenKeyset????????????? ??? ? 1?????????????????????? Launches a keyset type of cursor.
adOpenDynamic??????????????? 2?????????????????????? Launches a dynamic-type cursor.
adOpenStatic??????????????????? ? 3????????????????????? Launches a static type of cursor.
--------------------------------------------------------------
These cursor types will directly affect all properties and methods of the Recordset object, and the following list illustrates the differences between them.
--------------------------------------------------------------
Recordset Properties adOpenForwardOnly?? adOpenKeyset?? adOpenDynamic?? adOpenStatic
--------------------------------------------------------------
AbsolutePage?????????? Do not support read/write readable
AbsolutePosition????? ? Do not support read-write readable
ActiveConnection???? Read-write, read-write, read-write readable
BOF??????????????????????? Read-only read-only read-only
Bookmark?????????????? Do not support read/write readable
CacheSize??????????????? Read-write, read-write, read-write readable
CursorLocation??????? Read-write, read-write, read-write readable
CursorType????????????? Read-write, read-write, read-write readable
EditMode???????????????? Read-only read-only? Read-only
Eof???????????????????????? Read-only read-only read-only
Filter?????????????????????? Read-write, read-write, read-write readable
LockType?????????????? Read-write, read-write, read-write readable
MarshalOptions?????? Read-write, read-write, read-write readable
MaxRecords??????????? Read-write, read-write, read-write readable
PageCount????????????? Do not support read-only Read only
PageSize???????????????? Read-write, read-write, read-write readable
RecordCount???????? Do not support read-only Read only
Source??????????????????? Read-write, read-write, read-write readable
State????????????????????? Read-only read-only read-only
Status???????????????????? Read-only read-only read-only
AddNew?????????????? Support Support Support Support
CancelBatch??????? ? Support Support Support Support
CancelUpdate??????? Support Support Support Support
Clone??????????????????? Unsupported support Not supported
Close??????????????????? Support Support Support Support
Delete??????????????????? Support Support Support Support
GetRows?????????????? Support Support Support Support
Move?????????????????? Support Support Support not supported
MoveFirst??????????? ? Support Support Support support
MoveLast???????????? Support Support Support not supported
MoveNext??????????? Support Support Support Support
MovePrevious??????? Support Support Support not supported
NextRecordset?????? Support Support Support Support
Open??????????????????? Support Support Support Support
Requery??????????????? Support Support Support Support
Resync?????????????????? Unsupported support support is not supported
Supports?????????????? Support Support Support Support
Update????????????????? Support Support Support Support
UpdateBatch??????? Support Support Support Support
--------------------------------------------------------------
Where the NextRecordset method does not apply to Microsoft Access databases.
LockType
The LockType parameter of the Recordset object's Open method represents the lock type to take, and if this argument is omitted, then the system takes the LockType property of the Recordset object as the preset value. The LockType parameters include adLockReadOnly, adlockprssimistic, adLockOptimistic, and adLockBatchOptimistic, as described below:
-------------------------------------------------------------
Constants Constant Numerical description
--------------------------------------------------------------
adLockReadOnly 1 defaults, the Recordset object starts as read-only and cannot run AddNew, Update, and Delete methods
Adlockprssimistic 2 When the data source is being updated, the system temporarily locks the actions of other users to maintain data consistency.
adLockOptimistic 3 When the data source is being updated, the system does not lock other users ' actions, other users can add, delete, and change the operation of the data.
adLockBatchOptimistic 4 When the data source is being updated, other users must change the CursorLocation property to Adudeclientbatch to increase the data.
Delete, change the operation.