Cursor (Recordset constructor): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
m (Redirected page to Cursor (Recordset function))
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
#REDIRECT: [[Cursor (Recordset function)]]
[[Category:Recordset methods|Cursor constructor]]
<p>
<var>Cursor</var> is a member of the <var>[[Recordset class|Recordset]]</var> class.
</p>
 
Instantiates a <var>[[RecordsetCursor class|RecordSetCursor]]</var> object for a
particular instance of a <var>Recordset</var> object.
==Syntax==
<p class="syntax">%rscursor = %rs:Cursor([LoopLockStrength=lockstrength])
</p>
===Syntax Terms===
<table class="syntaxTable">
<tr><th>%rscursor</th>
<td>A declared <var>RecordsetCursor</var> object, to which <var>Cursor</var> returns an instance of a <var>RecordsetCursor</var> object, if ''%rs'' has at least one record. If ''%rs'' has no records, <var>Cursor</var> returns a <var>Null</var> object.
</td></tr>
<tr><th>%rs</th>
<td>A reference to an instance of a <var>Recordset</var> object.
</td></tr>
<tr><th><b>LoopLockStrength=</b>lockstrength</th>
<td>The lock strength to be used for <var>For Record At</var> loops on the cursor. This is an optional, [[Notation conventions for methods#Named parameters|name required]], parameter, available in <var class="product">Sirius Mods</var> 7.0 and later. It defaults to <var>None</var>. See [[RecordsetCursor#LoopLockStrength for RecordsetCursors|"LoopLockStrength for RecordsetCursors"]].
 
</td></tr></table>
==Usage Notes==
<ul>
<li>You can have as many cursors as you want for a record set.
<li>To test for an empty record set, use <var>[[IsEmpty (Recordset property)|IsEmpty]]</var>, which
is much more efficient than testing the record <var>Count</var> for 0,
<li>The instantiated <var>RecordsetCursor</var> is automatically
positioned on the first record in the set.
</ul>

Latest revision as of 17:29, 15 April 2011