Cursor (Recordset function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
mNo edit summary
Line 1: Line 1:
{{Template:Recordset:Cursor subtitle}}
{{Template:Recordset:Cursor subtitle}}


Instantiates a <var>[[RecordsetCursor class|RecordSetCursor]]</var> object for a
particular instance of a <var>Recordset</var> object.
==Syntax==
==Syntax==
{{Template:Recordset:Cursor syntax}}
{{Template:Recordset:Cursor syntax}}
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
<tr><th>%rscursor</th>
<tr><th>%recordsetCursor</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>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>
</td></tr>
<tr><th>%rs</th>
<tr><th>recordset</th>
<td>A reference to an instance of a <var>Recordset</var> object.
<td>A reference to an instance of a <var>Recordset</var> object.
</td></tr>
</td></tr>
<tr><th><b>LoopLockStrength=</b>lockstrength</th>
<tr><th><var>LoopLockStrength</var></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>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"]].



Revision as of 19:43, 15 April 2011

Create a RecordsetCursor object from a Recordset (Recordset class)


Syntax

%recordsetCursor = recordset:Cursor[( [LoopLockStrength= lockStrength])]

Syntax terms

%recordsetCursor A declared RecordsetCursor object, to which Cursor returns an instance of a RecordsetCursor object, if %rs has at least one record. If %rs has no records, Cursor returns a Null object.
recordset A reference to an instance of a Recordset object.
LoopLockStrength The lock strength to be used for For Record At loops on the cursor. This is an optional, name required, parameter, available in Sirius Mods 7.0 and later. It defaults to None. See "LoopLockStrength for RecordsetCursors".

Usage notes

  • You can have as many cursors as you want for a record set.
  • To test for an empty record set, use IsEmpty, which is much more efficient than testing the record Count for 0,
  • The instantiated RecordsetCursor is automatically positioned on the first record in the set.

See also