Clear (Recordset subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (1 revision)
Line 1: Line 1:
<span class="pageSubtitle"><section begin=dpl_desc/><section end=dpl_desc/></span>
{{Template:Recordset:Clear subtitle}}
[[Category:Recordset methods|Clear subroutine]]
<p>
<var>Clear</var> is a member of the <var>[[Recordset class|Recordset]]</var> class.
</p>


<var>Clear</var> removes all of the records in a <var>Recordset</var> object, without discarding the object.
<var>Clear</var> removes all of the records in a <var>Recordset</var> object, without discarding the object.
Line 11: Line 7:
The <var>Clear</var> method is only available in <var class="product">Sirius Mods</var> 7.0 and later.
The <var>Clear</var> method is only available in <var class="product">Sirius Mods</var> 7.0 and later.
==Syntax==
==Syntax==
<p class="syntax">%rs:Clear
{{Template:Recordset:Clear syntax}}
</p>
===Syntax terms===
===Syntax terms===
<table class="syntaxTable">
<table class="syntaxTable">
Line 18: Line 13:
<td>A non-null <var>Recordset</var> object variable.
<td>A non-null <var>Recordset</var> object variable.
</td></tr></table>
</td></tr></table>
==Usage Notes==
==Usage notes==
<ul>
<ul>
<li>If an active <var>For</var> loop references a <var>Recordset</var> object, either via a direct
<li>If an active <var>For</var> loop references a <var>Recordset</var> object, either via a direct
Line 29: Line 24:
described in [[The RecordsetCursor class#Cursor state|"Cursor state"]].
described in [[The RecordsetCursor class#Cursor state|"Cursor state"]].
</ul>
</ul>
==See also==
{{Template:Recordset:Clear footer}}

Revision as of 23:59, 14 April 2011

Remove all records from Recordset (Recordset class)


Clear removes all of the records in a Recordset object, without discarding the object. It provides functionality identical to the User Language Clear List statement, but it does so for Recordset objects.

The Clear method is only available in Sirius Mods 7.0 and later.

Syntax

recordset:Clear

Syntax terms

%rs A non-null Recordset object variable.

Usage notes

  • If an active For loop references a Recordset object, either via a direct reference to the Recordset object or via a RecordsetCursor instantiated against the Recordset, and that Recordset is cleared by the Clear method, its record will be closed.
  • If a RecordsetCursor object is instantiated against a Recordset object that gets cleared, the State property of the RecordsetCursor object is set to the CursorState enumeration value NoRecord, which is described in "Cursor state".

See also