<< Click to Display Table of Contents >> AdoServer:RecNo Access |
![]() ![]() ![]() |
Get current record number
ACCESS RECNO CLASS AdoServer
LONG Current record number. In general >= 0, but in some situations (for example just after deleting a record) a valie of -1 may be returned.
Note The record number is not a very reliable method to identify a record in ADO. A much safer alternative is the Bookmark if the recordset supports bookmarks.
Note 2 When the cursor is on a deleted record (just after deleting the record) this access will return -1. This is not a valid record number, but an indication of the deleted status of the current record
// Save current record
nOldRec := oServer:RECNO
// Retrieve new record
oServer:Seek(...)
.
. // Do stuff
.
//Go back to original record
oServer:Goto(nOldRec)
AdoServer, AdoServer:Goto(), AdoServer:Bookmark