Skip to content

MvGO#


Operating on an open database or query, this tag moves to the physical record in the database in NAME, regardless of how the database is indexed. If NAME is omitted, the record pointer for the primary database is moved.

Syntax
<MvGO NAME = "string: {  expression } | literal"
      ROW = "numeric: { expression } | top | bottom"
      VIEW = "string: {  expression } | literal"> 

Attributes#

Attribute Description
NAME (Optional) Database alias. When a database is opened with <MvOPEN>, it is referenced in all other database commands by the alias. If omitted, the records pointer for the primary database is moved. The database must be open.
ROW Numeric value or the keywords top or bottom which move the record pointer respectively, to the first and last database record.
VIEW (Optional) odbc_view. Support for ODBC has been dropped so this attribute can be omitted.

Examples#

The row number generally referrers to the row in physical, not indexed order. There are two exceptions to this: if
the database is indexed, the special values ‘top’ and ‘bottom’ will move the record pointer to the first and last
records in indexed order. It follows from this that ‘top’ and ‘bottom’ do not move the record pointer to the physical
top and bottom of an indexed database. In this situation, you can achieve the same effect via the following:

This example moves the record pointer of the primary database, to the first or last physical record regardless of any
open index.

<MvGO ROW="1"> <!-- move to the first physical record -->
<MvGO ROW="{ alias.d.totrec }"> <!-- move to the physical last record -->

This example moves the record pointer of the primary database to the first or last physical record, if an index is NOT open, or the first or last indexed record if index is open.

<MvGO ROW="top">
<MvGO ROW="bottom">

Often ROW="top" is used at the start of defined search functions to ensure that the search starts from the first record, otherwise, subsequent calls to the function may result in searching forward from an unknown position in the database.

<MvGO NAME="categories" ROW="top">
<MvFIND NAME="categories" VALUE="{ categories.d.id EQ l.id }" EXACT>