Difference between revisions of "Recordset"

From Lianjapedia
Jump to: navigation, search
(Events)
 
(30 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.
 +
 
====Properties====
 
====Properties====
  
This class supports the '''Common properties''' plus the following:
+
This class supports the [[:Category:Common_Properties|Common Properties]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Property
 
!width="20%"|Property
 
!Access (R/RW)
 
!Access (R/RW)
Line 9: Line 11:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|Bof
+
|valign="top"|Bof
|R
+
|valign="top"|R
|boolean
+
|valign="top"|Boolean
|Returns true if at beginning of file marker, otherwise false
+
|valign="top"|Whether record pointer is at beginning of dataset
 
|-
 
|-
|Eof
+
|valign="top"|Eof
|R
+
|valign="top"|R
|boolean
+
|valign="top"|Boolean
|Returns true if at end of file marker, otherwise false
+
|valign="top"|Whether record pointer is at end of recordset
 
|-
 
|-
|Fieldcount
+
|valign="top"|FieldCount
|R
+
|valign="top"|R
|numeric
+
|valign="top"|Numeric
|Number of fields
+
|Number of fields in the dataset
|-
+
|Fields
+
|R
+
|object
+
|
+
 
|-
 
|-
 
|Filter
 
|Filter
 
|RW
 
|RW
|string
+
|Character
|Current filter condition, '(null)' if none set
+
|Filter expression to restrict records
 
|-
 
|-
 
|valign="top"|Found
 
|valign="top"|Found
 
|valign="top"|R
 
|valign="top"|R
|valign="top"|boolean
+
|valign="top"|Boolean
|Returns true after the seek method if a matching record was found, false if not found
+
|Whether the last seek or find operation found a matching record
 
|-
 
|-
 
|Index
 
|Index
 
|RW
 
|RW
|string
+
|Character
|Tag name of current master index order, '0' if none set.
+
|Name of the index tag
 
|-
 
|-
|valign="top"|Nomatch
+
|valign="top"|NoMatch
 
|valign="top"|R
 
|valign="top"|R
|valign="top"|boolean
+
|valign="top"|Boolean
|Returns true after the seek method if no matching record was found, false if found
+
|Whether the last seek or find operation did not find any matching records
 
|-
 
|-
|Recordcount
+
|RecordCount
 
|R
 
|R
|numeric
+
|Numeric
|Number of records
+
|Number of records in the dataset
 
|-
 
|-
|Recordnumber
+
|valign="top"|RecordNumber
|R
+
|valign="top"|R
|numeric
+
|valign="top"|Numeric
|Current record number
+
|Number of the current record in the dataset
 
|-
 
|-
 
|}
 
|}
Line 63: Line 60:
 
====Methods====
 
====Methods====
  
This class supports the '''Common methods''' plus the following:
+
This class supports the [[:Category:Common_Methods|Common Methods]] plus the following:
  
{| class="wikitable"
+
{| class="wikitable" width="100%"
 
!width="20%"|Method
 
!width="20%"|Method
 
!Args
 
!Args
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|Addnew
+
|valign="top"|AddNew
|
+
|valign="top"|None
|
+
|Adds a new record to the recordset. Field values of the new record can then be modified.  Complete the add/modification by calling the update method.
 
|-
 
|-
 
|Close
 
|Close
|
+
|None
|
+
|Closes the recordset
 
|-
 
|-
|Column
+
|valign="top"|Column
|
+
|valign="top"|columnumber as Numeric
|
+
|valign="top"|Return the value of the specified column in the current record
 
|-
 
|-
|Delete
+
|valign="top"|Delete
|
+
|valign="top"|None
|
+
|valign="top"|Marks the current record in a table recordset for deletion
 
|-
 
|-
|Edit
+
|valign="top"|Edit
|
+
|valign="top"|None
|
+
|Puts the current record in recordset in edit mode, prior to field value modification.  Complete the modification by calling the update method.
 
|-
 
|-
|Execute
+
|valign="top"|Execute
|
+
|command as Character
|
+
|valign="top"|Execute the command
 
|-
 
|-
|Fcount
+
|valign="top"|Fcount
|none
+
|valign="top"|None
 
|Returns the number of fields/columns in the recordset
 
|Returns the number of fields/columns in the recordset
 
|-
 
|-
|Fields
+
|valign="top"|Fields
|
+
|valign="top"|[fieldname as Character | fieldnumber as Numeric]
|
+
|valign="top"|Return an object reference to the specified [[Field]] in the current record
 
|-
 
|-
|Findfirst
+
|valign="top"|FindFirst
|
+
|valign="top"|condition as Character
|
+
|Move the record pointer to the first record in the recordset to match the condition
 
|-
 
|-
|Findlast
+
|valign="top"|FindLast
|
+
|valign="top"|condition as Character
|
+
|Move the record pointer to the last record in the recordset to match the condition
 
|-
 
|-
|Findnext
+
|valign="top"|FindNext
|
+
|valign="top"|condition as Character
|
+
|Move the record pointer to the next record in the recordset to match the condition
 
|-
 
|-
|Findprevious
+
|valign="top"|FindPrevious
|
+
|valign="top"|condition as Character
|
+
|Move the record pointer to the previous record in the recordset to match the condition
 
|-
 
|-
|Movebookmark
+
|valign="top"|MoveBookmark
|
+
|valign="top"|bookmark as Numeric
|
+
|valign="top"|Move bookmark to the specified record number in the recordset
 
|-
 
|-
|Movefirst
+
|valign="top"|Movefirst
|none
+
|valign="top"|None
|Move record pointer to first record in the recordset  
+
|valign="top"|Move record pointer to first record in the recordset  
 
|-
 
|-
|Movelast
+
|valign="top"|Movelast
|none
+
|valign="top"|None
|Move record pointer to last record in the recordset
+
|valign="top"|Move record pointer to last record in the recordset
 
|-
 
|-
|Movenext
+
|valign="top"|Movenext
|none
+
|valign="top"|None
|Move record pointer to next record in the recordset
+
|valign="top"|Move record pointer to next record in the recordset
 
|-
 
|-
|Moveprevious
+
|valign="top"|Moveprevious
|none
+
|valign="top"|None
|Move record pointer to previous record in the recordset
+
|valign="top"|Move record pointer to previous record in the recordset
 
|-
 
|-
 
|valign="top"|Moverelative
 
|valign="top"|Moverelative
|valign="top"|nrecords
+
|valign="top"|numrecords as Numeric
|Move record pointer by nrecords records: forwards if nrecords is positive, backwards if nrecords is negative
+
|Move record pointer by numrecords records: forwards if numrecords is positive, backwards if numrecords is negative
 
|-
 
|-
|Reccount
+
|valign="top"|RecCount
|none
+
|valign="top"|None
|Returns the number of records in the recordset
+
|Return the number of records in the recordset
 
|-
 
|-
|Recno
+
|RecNo
|none
+
|None
|Returns the current record number in the recordset
+
|Return the current record number in the recordset
 
|-
 
|-
 
|Requery
 
|Requery
|
+
|None
|
+
|Requery the recordset
 
|-
 
|-
|Seek
+
|valign="top"|Seek
|
+
|valign="top"|[operator as Character,] key as Character
|
+
|valign="top"|Search the index for the first record to match the key.  The operator (=, >, <) may optionally be specified.
 
|-
 
|-
|SQLExecute
+
|valign="top"|SQLExecute
|
+
|sqlcommand as Character
|
+
|valign="top"|Execute the SQL command
 
|-
 
|-
|Update
+
|valign="top"|Update
|
+
|valign="top"|None
|
+
|Completes an addnew or edit method operation
 
|-
 
|-
 
|}
 
|}
  
====Events====
 
  
This class supports the '''Common events''' plus the following:
 
  
{| class="wikitable"
+
[[Category:Documentation]]
!width="20%"|Event
+
[[Category:Framework Classes]]
!Args
+
[[Category:Working with Data]]
!width="50%"|Description
+
 
+
|}
+

Latest revision as of 11:28, 10 April 2019

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
Bof R Boolean Whether record pointer is at beginning of dataset
Eof R Boolean Whether record pointer is at end of recordset
FieldCount R Numeric Number of fields in the dataset
Filter RW Character Filter expression to restrict records
Found R Boolean Whether the last seek or find operation found a matching record
Index RW Character Name of the index tag
NoMatch R Boolean Whether the last seek or find operation did not find any matching records
RecordCount R Numeric Number of records in the dataset
RecordNumber R Numeric Number of the current record in the dataset

Methods

This class supports the Common Methods plus the following:

Method Args Description
AddNew None Adds a new record to the recordset. Field values of the new record can then be modified. Complete the add/modification by calling the update method.
Close None Closes the recordset
Column columnumber as Numeric Return the value of the specified column in the current record
Delete None Marks the current record in a table recordset for deletion
Edit None Puts the current record in recordset in edit mode, prior to field value modification. Complete the modification by calling the update method.
Execute command as Character Execute the command
Fcount None Returns the number of fields/columns in the recordset
Fields [fieldname as Character | fieldnumber as Numeric] Return an object reference to the specified Field in the current record
FindFirst condition as Character Move the record pointer to the first record in the recordset to match the condition
FindLast condition as Character Move the record pointer to the last record in the recordset to match the condition
FindNext condition as Character Move the record pointer to the next record in the recordset to match the condition
FindPrevious condition as Character Move the record pointer to the previous record in the recordset to match the condition
MoveBookmark bookmark as Numeric Move bookmark to the specified record number in the recordset
Movefirst None Move record pointer to first record in the recordset
Movelast None Move record pointer to last record in the recordset
Movenext None Move record pointer to next record in the recordset
Moveprevious None Move record pointer to previous record in the recordset
Moverelative numrecords as Numeric Move record pointer by numrecords records: forwards if numrecords is positive, backwards if numrecords is negative
RecCount None Return the number of records in the recordset
RecNo None Return the current record number in the recordset
Requery None Requery the recordset
Seek [operator as Character,] key as Character Search the index for the first record to match the key. The operator (=, >, <) may optionally be specified.
SQLExecute sqlcommand as Character Execute the SQL command
Update None Completes an addnew or edit method operation