Click or drag to resize

SQLSelect.GoTop Method

X#
Position the data server on the first row.

Namespace:  VO
Assembly:  VOSQLClasses (in VOSQLClasses.dll) Version: 2.19
Syntax
 VIRTUAL METHOD GoTop() AS USUAL
Request Example View Source

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
Sends a NotifyGoTop message, if successful.
Examples
The following example demonstrates the value that SQLSelect:RecNo returns after the SQLSelect:GoTop() 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