State (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> State property <p> <var>State</var> is a member of the <va...")
 
mNo edit summary
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
[[Category:RecordsetCursor methods|State property]]
[[Category:RecordsetCursor methods|State function]]
<p>
<p>
<var>State</var> is a member of the <var>[[RecordsetCursor class|RecordsetCursor]]</var> class.
<var>State</var> is a member of the <var>[[RecordsetCursor class|RecordsetCursor]]</var> class.
</p>
</p>


This [[Classes and objects#readWrite|read-only]] method returns the current state of the cursor.
This [[Classes and Objects#readWrite|read-only]] method returns the current state of the cursor.
==Syntax==
==Syntax==
<p class="syntax">%cstate = %rscursor:State
<p class="syntax">%cstate = %rscursor:State
Line 12: Line 12:
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%cstate</th>
<tr><th>%cstate</th>
<td>If specified, a declared enumeration object of type <var>CursorState</var> to contain the returned value of <var>State</var>. Possible values are <var>BeforeStart</var>, <var>HasRecord</var>, <var>AfterEnd</var>, <var>NoRecord</var>, and <var>Empty</var>, as described in [[RecordsetCursor#Cursor state|"Cursor state"]].
<td>If specified, a declared enumeration object of type <var>CursorState</var> to contain the returned value of <var>State</var>. Possible values are <var>BeforeStart</var>, <var>HasRecord</var>, <var>AfterEnd</var>, <var>NoRecord</var>, and <var>Empty</var>, as described in [[RecordsetCursor class#Cursor state|"Cursor state"]].
</td></tr>
</td></tr>
<tr><th>%rscursor</th>
<tr><th>%rscursor</th>

Revision as of 22:41, 26 April 2011

<section begin=dpl_desc/><section end=dpl_desc/>

State is a member of the RecordsetCursor class.

This read-only method returns the current state of the cursor.

Syntax

%cstate = %rscursor:State

Syntax terms

%cstate If specified, a declared enumeration object of type CursorState to contain the returned value of State. Possible values are BeforeStart, HasRecord, AfterEnd, NoRecord, and Empty, as described in "Cursor state".
%rscursor An instantiated RecordsetCursor object.

Example

The following fragment suggests a way to use the State property with a cursor object:

%rs is object recordSet in file myfile %srecs is object SortedRecordset in file myfile %myCursor is object RecordsetCursor in file myfile ... fd to %rs end find ... sort records in %rs to %srecs by name ... %myCursor = %srecs:Cursor fr in %srecs ... repeat while ( %myCursor:State = hasrecord ) end for ...