AdoServer:RecNo Access

<< Click to Display Table of Contents >>

Navigation:  Dataservers > AdoServer Class >

AdoServer:RecNo Access

Previous pageReturn to chapter overviewNext page

Purpose

Get current record number

 

Prototype

ACCESS RECNO CLASS AdoServer

 

Return

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.

 

Description

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

 

Example(s)

// Save current record

nOldRec := oServer:RECNO

// Retrieve new record

oServer:Seek(...)

.

.           // Do stuff

.

//Go back to original record

oServer:Goto(nOldRec)

 

 

See Also

AdoServer, AdoServer:Goto(), AdoServer:Bookmark