Previous (RecordsetCursor function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
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]]
<p>
<var>Previous</var> is a member of the <var>[[RecordsetCursor class|RecordsetCursor]]</var> class.
</p>


This [[Notation conventions for methods#Callable methods|callable]]
This [[Notation conventions for methods#Callable methods|callable]]
method positions the cursor on the &ldquo;previous&rdquo; record
method positions the cursor on the &amp;ldquo;previous&amp;rdquo; record
in the set, and it returns a <var>CursorState</var> enumeration
in the set, and it returns a <var>CursorState</var> enumeration
indicating the state of the cursor after the operation.
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">
Line 22: Line 17:
</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>Previous 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> &amp;mdash; Advances to the previous record (if there is one).
<li><var>AfterEnd</var> &mdash; Advances to the last record.
<li><var>AfterEnd</var> &amp;mdash; Advances to the last record.
</ul>
</ul>
<li>If <var>Previous</var> is called on a cursor whose state is <var>BeforeStart</var>, the
<li>If <var>Previous</var> is called on a cursor whose state is <var>BeforeStart</var>, the
Line 33: Line 28:
<li>After issuing <var>Previous</var>, the cursor is left in one of two states:
<li>After issuing <var>Previous</var>, the cursor is left in one of two states:
<ul>
<ul>
<li><var>HasRecord</var> &mdash; The cursor moved to a new record, and it is ready to go.
<li><var>HasRecord</var> &amp;mdash; The cursor moved to a new record, and it is ready to go.
<li><var>BeforeStart</var> &mdash; The cursor ran off the beginning, and it
<li><var>BeforeStart</var> &amp;mdash; The cursor ran off the beginning, and it
points to no record.
points to no record.
</ul>
</ul>
</ul>
</ul>
==See also==
{{Template:RecordsetCursor:Previous footer}}

Revision as of 22:48, 26 April 2011

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


This callable method positions the cursor on the &ldquo;previous&rdquo; record in the set, and it returns a CursorState enumeration indicating the state of the cursor after the operation.

Syntax

[%cursorState =] recordsetCursor:Previous

Syntax terms

%cstate If specified, a declared enumeration object of type CursorState to contain the state of the cursor after the completion of Previous. Valid values are described in "Cursor state".
%rscursor An instantiated RecordsetCursor object.

Usage notes

  • Previous may be issued if the cursor is in one of two states:
    • HasRecord &mdash; Advances to the previous record (if there is one).
    • AfterEnd &mdash; 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 &mdash; The cursor moved to a new record, and it is ready to go.
    • BeforeStart &mdash; The cursor ran off the beginning, and it points to no record.

See also