Click or drag to resize

SQLSelect.Recno Property

X#
A numeric value representing the relative position in the data server.

Namespace:  VO
Assembly:  VOSQLClasses (in VOSQLClasses.dll) Version: 2.21
Syntax
 VIRTUAL PROPERTY Recno AS USUAL GET 
Request Example View Source

Property Value

Type: Usual
A numeric value representing the relative position in the data server.
Remarks
A numeric value representing the relative position in the data server. It is not possible to efficiently or accurately determine how many records are in the result set for SQL (especially for databases that support scrollable cursors, like WATCOM). Therefore, negative numbers are used to reflect relative position from the bottom of the database, as positive numbers are used to reflect relative position from the top of the database. If the server is positioned at the Phantom record (after skipping past the last record) SQLSelect:Recno returns SQLSelect:Reccount+1
Examples
The following example demonstrates the value that SQLSelect:RecNo returns after each method is called:
X#
 1oCust := SQLSelect{"SELECT * FROM customer"}
 2oCust:GoTop()
 3? oCust:RECNO            // Prints 1
 4oCust:Skip()
 5? oCust:RECNO            // Prints 2
 6oCust:GoBottom()
 7? oCust:RECNO            // Prints -1
 8oCust:Skip(-1)
 9? oCust:RECNO            // Prints -2
10oCust:GoTop()
11? oCust:RECNO            // Prints 1
12oCust:Skip()
13? oCust:RECNO            // Prints 2
See Also