Clear (Recordset subroutine): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (→Usage notes) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:Recordset:Clear subtitle}} | |||
<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== | ||
{{Template:Recordset:Clear syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><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 | |||
==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 [[ | 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".