ToString (Recordset function): Difference between revisions
Jump to navigation
Jump to search
m (Created page with "{{Template:Recordset:ToString subtitle}} <var>ToString</var> returns to a lonstring the contents of the <var>Recordset</var> object. ==Syntax== {{Template:Recordset:ToString s...") |
m (→Syntax terms) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Template:Recordset:ToString subtitle}} | {{Template:Recordset:ToString subtitle}} | ||
<var>ToString</var> returns | <var>ToString</var> returns a longstring that has the count, lock strength, file, and record numbers for the <var>Recordset</var> object. | ||
==Syntax== | ==Syntax== | ||
{{Template:Recordset:ToString syntax}} | {{Template:Recordset:ToString syntax}} | ||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
<tr><th>%string</th> | <tr><th>%string</th> | ||
<td>A <var>longstring</var> variable to receive the contents of the <var>Recordset</var>. </td></tr> | <td>A <var>longstring</var> variable to receive the contents of the <var>Recordset</var>. </td></tr> | ||
<tr><th>recordset</th> | <tr><th>recordset</th> | ||
<td>A <var>Recordset</var> object variable. </td></tr> | <td>A <var>Recordset</var> object variable. </td></tr> | ||
<tr><th><var>MaxRecords</var></th> | <tr><th><var>MaxRecords</var></th> | ||
<td>This | <td>This [[Notation conventions for methods#Named parameters|name required]] argument is a numeric value that specifies an upper limit on the number of records to be included in the returned data. <var>MaxRecords</var> is an optional argument that defaults to 8. If set, it must be a positive value that is less than 16 million.</td></tr> | ||
</table> | </table> | ||
==Usage notes== | ==Usage notes== | ||
<ul> | <ul> | ||
<li><var>ToString</var> can be applied implicitly: simply Print (or Audit) an object variable, and the <var>ToString</var> method is automatically applied to the object. That is: | <li><var>ToString</var> can be applied implicitly: simply <var>Print</var> (or <var>Audit</var>) an object variable, and the <var>ToString</var> method is automatically applied to the object. That is: | ||
<p class="code">print %recset</p> is equivalent to: <p class="code">print %recset:ToString</p> | <p class="code">print %recset</p> is equivalent to: <p class="code">print %recset:ToString</p> | ||
</ul> | </ul> | ||
==Examples== | ==Examples== | ||
The following record display is produced by a <code>print %recset</code> statement. | |||
The following record display is produced by a <code>print %recset</code> | <p class="output">LockStrength=Share, Count=5, Records=(MYFILE: 0,1,2,3,4) | ||
statement | |||
<p class="output"> | |||
</p> | </p> | ||
==See also== | ==See also== | ||
{{Template:Recordset:ToString footer}} | {{Template:Recordset:ToString footer}} |
Latest revision as of 15:42, 7 November 2012
Information about Recordset (Recordset class)
ToString returns a longstring that has the count, lock strength, file, and record numbers for the Recordset object.
Syntax
%string = recordset:ToString[( [MaxRecords= number])]
Syntax terms
%string | A longstring variable to receive the contents of the Recordset. |
---|---|
recordset | A Recordset object variable. |
MaxRecords | This name required argument is a numeric value that specifies an upper limit on the number of records to be included in the returned data. MaxRecords is an optional argument that defaults to 8. If set, it must be a positive value that is less than 16 million. |
Usage notes
- ToString can be applied implicitly: simply Print (or Audit) an object variable, and the ToString method is automatically applied to the object. That is:
print %recset
is equivalent to:print %recset:ToString
Examples
The following record display is produced by a print %recset
statement.
LockStrength=Share, Count=5, Records=(MYFILE: 0,1,2,3,4)