Clear (Recordset subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
 
(3 intermediate revisions by 3 users not shown)
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">
<tr><th>%rs</th>
<tr><th>recordset</th>
<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 24: Line 20:
against the <var>Recordset</var>, and that <var>Recordset</var>
against the <var>Recordset</var>, and that <var>Recordset</var>
is cleared by the <var>Clear</var> method, its record will be closed.
is cleared by the <var>Clear</var> method, its record will be closed.
<li>If a <var>RecordsetCursor</var> object is instantiated against a <var>Recordset</var> object that
<li>If a <var>RecordsetCursor</var> object is instantiated against a <var>Recordset</var> object that
gets cleared, the <var>State</var> property of the <var>RecordsetCursor</var> object is set
gets cleared, the <var>State</var> property of the <var>RecordsetCursor</var> object is set
to the <var>CursorState</var> enumeration value <var>NoRecord</var>, which is
to the <var>CursorState</var> enumeration value <var>NoRecord</var>, which is
described in [[The RecordsetCursor class#Cursor state|"Cursor state"]].
described in [[RecordsetCursor class#Cursor state|"Cursor state"]].
</ul>
</ul>
==See also==
{{Template:Recordset:Clear footer}}

Latest revision as of 22:28, 6 November 2012

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

recordset 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