New (Recordset constructor): Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
m (1 revision) |
||
Line 1: | Line 1: | ||
{{Template:Recordset:New subtitle}} | |||
This function makes a new, empty instance of a <var>Recordset</var> object. | This function makes a new, empty instance of a <var>Recordset</var> object. | ||
==Syntax== | ==Syntax== | ||
{{Template:Recordset:New syntax}} | |||
===Syntax terms=== | ===Syntax terms=== | ||
<table class="syntaxTable"> | <table class="syntaxTable"> | ||
Line 25: | Line 19: | ||
</td></tr></table> | </td></tr></table> | ||
==Usage | ==Usage notes== | ||
<ul> | <ul> | ||
<li>Since the created <var>Recordset</var> object is empty, that is, contains no records, | <li>Since the created <var>Recordset</var> object is empty, that is, contains no records, | ||
Line 44: | Line 38: | ||
%rs = new( share ) | %rs = new( share ) | ||
</p> | </p> | ||
==See also== | |||
{{Template:Recordset:New footer}} |
Revision as of 23:59, 14 April 2011
Create a new Recordset object (Recordset class)
This function makes a new, empty instance of a Recordset object.
Syntax
%recordset = [%(Recordset In filOrGrp name):]New[( [lockStrength], - [LoopLockStrength= lockStrength])]
Syntax terms
%newSet | An empty Recordset object created by this method. |
---|---|
class | Either a class name that includes a file context in parentheses, as in %(Recordset in file sirLocal ), or a variable in the class, as in %recSet .
|
lockstrength | The lock strength of the instantiated Recordset object. Options are LockStrength enumeration values (None, Share, or Exclusive), which correspond to standard Model 204 record-locking levels, as described below. This is an optional parameter, and it defaults to Share.
|
LoopLockStrength=lockstrength | The lock strength to be used for loops on records in the Recordset object. This is an optional, name required parameter, available in Sirius Mods 7.0 and later. It defaults to None. See "LoopLockStrength for Recordsets". |
Usage notes
- Since the created Recordset object is empty, that is, contains no records, New needs to acquire no locks, so it cannot produce a record locking conflict.
- New is typically used in conjunction with AddRecord or AddRecordset, since without these methods, the object created by New is empty and therefore fairly uninteresting.
Examples
Example New statements follow:
%rs is object recordSet in foo %rs = new %rs = new( none ) %rs = new( exclusive ) %rs = new( share )