CurrentRecord (Record function): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 15: | Line 15: | ||
<td>The value of a <var>Lockstrength</var> enumeration: <var>None</var>, <var>Share</var>, or <var>Exclusive</var>. These correspond to standard <var class="product">Model 204</var> record-locking levels, as described below. The default lock strength of the new <var>Record</var> object is <var>Share</var>. <dl> <dt>None <dd>Record is not locked. <br> No locks are held on the object, so there is no conflict with others holding <var>Share</var> or <var>Exclusive</var> locks (readers and updaters may proceed). <dt>Share <dd>Record is share locked. <br> This level allows other users to hold a <var>Share</var> lock, but not an <var>Exclusive</var> lock (allows readers but not updaters to proceed). <dt>Exclusive <dd>Record is exclusively locked. <br> This level prohibits others from holding either an <var>Exclusive</var> lock or a <var>Share</var> lock. It is generally used for update. </dl> | <td>The value of a <var>Lockstrength</var> enumeration: <var>None</var>, <var>Share</var>, or <var>Exclusive</var>. These correspond to standard <var class="product">Model 204</var> record-locking levels, as described below. The default lock strength of the new <var>Record</var> object is <var>Share</var>. <dl> <dt>None <dd>Record is not locked. <br> No locks are held on the object, so there is no conflict with others holding <var>Share</var> or <var>Exclusive</var> locks (readers and updaters may proceed). <dt>Share <dd>Record is share locked. <br> This level allows other users to hold a <var>Share</var> lock, but not an <var>Exclusive</var> lock (allows readers but not updaters to proceed). <dt>Exclusive <dd>Record is exclusively locked. <br> This level prohibits others from holding either an <var>Exclusive</var> lock or a <var>Share</var> lock. It is generally used for update. </dl> | ||
</td></tr> | </td></tr> | ||
<tr><th>LoopLockStrength=lockstrength</th> | <tr><th><var>LoopLockStrength=lockstrength</var></th> | ||
<td>The lock strength to be used for loops on the <var>Record</var>. This is an optional, name required, parameter, and it defaults to <var>None</var>. See [[Record class#LoopLockStrength for Records|"LoopLockStrength for Records"]]. This parameter is available in <var class="product">Sirius Mods</var> 7.0 and later. | <td>The lock strength to be used for loops on the <var>Record</var>. This is an optional, name required, parameter, and it defaults to <var>None</var>. See [[Record class#LoopLockStrength for Records|"LoopLockStrength for Records"]]. This parameter is available in <var class="product">Sirius Mods</var> 7.0 and later. | ||
Revision as of 22:02, 20 April 2011
Create a Record object from current record in For loop or Recordset (Record class)
This shared function instantiates a Record object
from the current record in a For loop or record set.
Syntax
%record = [%(Record In filOrGrp name):]CurrentRecord[( [lockStrength], - [LoopLockStrength= lockStrength])] Throws RecordLockingConflict
Syntax terms
%(Record) | Since this is a shared method, this method object can be the class name, Record, in parentheses, or it can be a declared Record object variable, which must have the same file or group context as the For loop within which CurrentRecord is invoked.
Under Sirius Mods version 6.8 and later, the CurrentRecord method does not have to be preceded by any method object, since it acts like a constructor. For more information about shared methods, see "Shared class members". |
---|---|
lockstr | The value of a Lockstrength enumeration: None, Share, or Exclusive. These correspond to standard Model 204 record-locking levels, as described below. The default lock strength of the new Record object is Share.
|
LoopLockStrength=lockstrength | The lock strength to be used for loops on the Record. This is an optional, name required, parameter, and it defaults to None. See "LoopLockStrength for Records". This parameter is available in Sirius Mods 7.0 and later. |
Usage notes
- CurrentRecord must be invoked from inside a record loop that has the same file or group context as declared for the Record object variable.
- Under Sirius Mods version 6.8 and later, the CurrentRecord method name does not have to be preceded by the class name or by an object variable.
- For more information and examples, see "Using CurrentRecord to instantiate a Record object.