<doc>
  <legacy_id>3524</legacy_id>
  <name>revMoveToRecord</name>
  <type>command</type>
  <syntax>
    <example>revMoveToRecord <i>recordSetId</i>, <i>recordNumber</i></example>
  </syntax>
  <library>Database library</library>
  <objects>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <command tag="revMoveToNextRecord">revMoveToNextRecord Command</command>
  </references>
  <history>
    <introduced version="3.5">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
    <disk access="???"/>
    <network/>
  </security>
  <summary>Moves to the specified record in a record set (database cursor).</summary>
  <examples>
    <example>revMoveToRecord tCursor, the menuHistory of button "Record Number"</example>
    <example>revMoveToRecord tCursor, tCurrentRecord + kRecordsPerPage</example>
  </examples>
  <description>
    <p>Use the <b>revMoveToRecord</b> command to move around within the selected set of records.</p><p/><p><b>Parameters:</b></p><p>The <i>recordSetId</i> is the number returned by the revQueryDatabase function when the record set was created.</p><p>The <i>recordNumber</i> is the zero-based index of the record to move to (i.e. the first record is 0, the second is 1)</p><p/><p><b>Comments:</b></p><p>If the command could not move to the specified record, then the value of the <function tag="result">result function</function> will be set to false, otherwise it will be set to true.</p><p/><p>Not all databases support moving directly to a specified record in a record set, however for those that do, it will typically be faster to use the <b>revMoveToRecord</b> command than to repeatedly call <command tag="revMoveToNextRecord">revMoveToNextRecord</command> or <command tag="revMoveToPreviousRecord">revMoveToPreviousRecord</command>. If the database does not support the operation, LiveCode will attempt to emulate it. This emulation will typically be slower than random access on databases that support it. If the emulation does not succeed, then the <function tag="result">result</function> will be set to false.</p><p/><p>The <b>revMoveToRecord</b> command is currently supported by MySQL, PostgreSQL and SQLite. On ODBC, it will work providing that a forward only cursor has not been selected. For more information on ODBC Cursor types, please see the <function tag="revOpenDatabase">revOpenDatabase function</function>. The <b>revMoveToRecord</b> command is not supported by Oracle at the moment and will just return false.</p><p/><p>If you are using older database drivers (i.e. pre version 3.5), this command will not be supported. The error "revdberr,not supported by driver" will be thrown.</p>
  </description>
</doc>