Previous (RecordsetCursor function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Created page with "<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span> Previous function <p> <var>Previous</var> is a member of t...")
 
mNo edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:RecordsetCursor:Previous subtitle}}
[[Category:RecordsetCursor methods|Previous function]]
This [[Notation conventions for methods#Callable functions|callable]]
<p>
method returns a <var>CursorState</var> enumeration
<var>Previous</var> is a member of the <var>[[RecordsetCursor class|RecordsetCursor]]</var> class.
indicating the [[RecordsetCursor class#Cursor state|state]] of the cursor after it is moved.
</p>


This [[Notation conventions for methods#Callable methods|callable]]
method positions the cursor on the &ldquo;previous&rdquo; record
in the set, and it returns a <var>CursorState</var> enumeration
indicating the state of the cursor after the operation.
==Syntax==
==Syntax==
<p class="syntax">[%cstate =] %rscursor:Previous
{{Template:RecordsetCursor:Previous syntax}}
</p>
 
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%cstate</th>
<tr><th>%cursorState</th>
<td>If specified, a declared enumeration object of type <var>CursorState</var> to contain the state of the cursor after the completion of <var>Previous</var>. Valid values are described in [[RecordsetCursor#Cursor state|"Cursor state"]].
<td>An enumeration object of type <var>CursorState</var> to contain the state of the cursor after the completion of <var>Previous</var>. Valid values are described in [[RecordsetCursor class#Cursor state|"Cursor state"]].</td></tr>
</td></tr>
 
<tr><th>%rscursor</th>
<tr><th>recordsetCursor</th>
<td>An instantiated <var>RecordsetCursor</var> object.
<td>A <var>RecordsetCursor</var> object.</td></tr>
</table>


</td></tr></table>
==Usage notes==
==Usage Notes==
<ul>
<ul>
<li>Previous may be issued if the cursor is in one of two states:
<li><var>Previous</var> may be issued if the cursor is in one of two states:
<ul>
<ul>
<li><var>HasRecord</var> &mdash; Advances to the previous record (if there is one).
<li><var>HasRecord</var> &mdash; Advances to the previous record (if there is one).
Line 37: Line 32:
</ul>
</ul>
</ul>
</ul>
==See also==
{{Template:RecordsetCursor:Previous footer}}

Latest revision as of 21:02, 12 November 2012

Move cursor to the previous record in the set (RecordsetCursor class)

This callable method returns a CursorState enumeration indicating the state of the cursor after it is moved.

Syntax

[%cursorState =] recordsetCursor:Previous

Syntax terms

%cursorState An enumeration object of type CursorState to contain the state of the cursor after the completion of Previous. Valid values are described in "Cursor state".
recordsetCursor A RecordsetCursor object.

Usage notes

  • Previous may be issued if the cursor is in one of two states:
    • HasRecord — Advances to the previous record (if there is one).
    • AfterEnd — Advances to the last record.
  • If Previous is called on a cursor whose state is BeforeStart, the request is cancelled.
  • After issuing Previous, the cursor is left in one of two states:
    • HasRecord — The cursor moved to a new record, and it is ready to go.
    • BeforeStart — The cursor ran off the beginning, and it points to no record.

See also