DbServer.RecNo Property (Typed) | |
A numeric value representing the current record number, identifying the position of the record pointer.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL PROPERTY RecNo AS LONG GET SET
public override int RecNo { get; set; }
Request Example
View SourceProperty Value
Type:
LongA numeric value representing the current record number, identifying the position of the record pointer.
Remarks
A numeric value representing the current record number, identifying the position of the record pointer.
Assigning a value to RecNo is equivalent to executing GoTo(); both reposition the record pointer on the given record.
These two statements are equivalent:
1oDBServer:RecNo := 1168
2oDBServer:GoTo(1168)
If the server contains a database file with 0 records, RecNo returns 1, BOF and EOF both return TRUE, and RecCount/LastRec return 0. If the record pointer is moved past the last record, RecNo returns LastRec + 1 and EOF returns TRUE. If an attempt is made to move before the first record, RecNo returns the record number of the first logical record in the database file and BOF returns TRUE.
The DBServer:RecNo assign sends a NotifyIntentToMove message before the operation.
Examples
This example queries RecNo after deliberately moving the record pointer:
1CLASS Sales INHERIT DBServer
2...
3FUNCTION RecNoDemo()
4LOCAL oDBSales AS Sales
5oDBSales := Sales{}
6oDBSales:GoTo(3)
7? oDBSales:RECNO
8oDBSales:GoTop()
9? oDBSales:RECNO
10oDBSales:GoBottom()
11? oDBSales:RECNO
See Also