RecordSet

Object List Next Object

Definition:

Provides an organized framework for connecting to a data source for the purpose of viewing and/or modifying the data in the data source. A RecordSet references an "underlying" FixedAscii, DelimitedAscii, or ODBC database through its Database object reference property. These underlying database objects organize data in a row/column table format.

Specialized Features:

The following tables list and describe the properties, methods, and events that are added by RecordSet.


Properties Use to...


BOF Indicate whether the current record is the first record in the underlying database.

Connect Determine the information needed to open and attach to an external database.

Controls List the controls currently attached or bound to one of the fields in the FieldList property of the RecordSet object.

CurrentRecord Supply an object reference to a persistent object that refers to the "current" record.

CurrentRecordNumber Determine the row number that the CurrentRecord refers to.

Database Provide an object reference to the underlying Database object for the DataControl.

DatabaseType Display the type of database that is being accessed. When the DatabaseType is set, a corresponding Database object is dynamically created and referenced in the Database property.

EditMode Indicate the state of editing of the current record.

EOF Indicate whether the CurrentRecordNumber is the last record in the underlying database.

FieldCount Reflect the number of fields that are available in the underlying database.

FieldIndex Specify an index into the FieldList property.

FieldList List the fields that are available in the underlying database if there is an active connection and no current query.

FieldMaxLength Specify the maximum length of the field that is in position FieldIndex in the FieldList property.

FieldName Specify the name of the field that is in position FieldIndex in the FieldList property.

NoMatch Indicate whether or not a find method was successful in locating a record that matched the search criteria.

ReadComplete Indicate the number of Records in the underlying database referenced by this RecordSet.

ReadOnly Determine whether Records are allowed to be changed in the underlying database.

RecordSource Indicate the table name or SQL string that is used to retrieve data into the underlying database.

RowsRead Indicate the number of Records in the Database referenced by this RecordSet.


Methods Use To...


AddNew Create a new record in the underlying database of the RecordSet.

Column Return an object that represents the column designated by position. The column can consist of an arbitary number of rows.

Columns Return an object that represents the column range beginning at a specific column start position and including a specified number of columns from that point. The column range can consist of an arbitary number of rows.

Delete Delete the current record in the underlying database indicated by the RecordSet's CurrentRecordNumber property.

DetailedEdit Display a Database Wizard designed to assist in the configuration of a RecordSet object.

Fields Return a Dynaset object representing the field name that is specified.

FindFirst Find the first occurrence of a string in the underlying database that matches the search string.

FindLast Find the last occurrence of a string in the underlying database that matches the search string.

FindNext Find the next occurrence of a string from the CurrentRecordNumber in the underlying database that matches the search string.

FindPrev Find the previous occurrence of a string from the CurrentRecordNumber in the underlying database that matches the search string.

Modify Set or change the value of the specified field.

MoveFirst Move to the first record in the underlying database object.

MoveLast Move to the last record in the underlying database object.

MoveNext Move to the next record in the underlying database object.

MovePrev Move to the previous record in the underlying database object.

Refresh Discard any changes made that have not been committed and re-initializes the RecordSet with new data from the database source.

Row Return an object that represents a specific row in the underlying database.

Rows Return an object that represents the specified Rows requested in the underlying database.

SaveFile Save the contents of the Dynaset to a specified filename, creating it if necessary.

TextUnload Append statements necessary to regenerate the object from text. It is used by the Text-based object saving mechanism that is used by the write module (as text) functions.

Update Saves unsaved record changes to the underlying database of the RecordSet.

UpdateAll Save all unsaved changes to the underlying Database.

Value Return the text character string represented by the object returned by a RecordSet method.

ValueData Return the value represented by the object in a DataBuffer.


Events Use To...


Reposition An event that is triggered after a record becomes current.

Validate An event that is triggered prior to completing a move to a new record.

Copied Features:

Noneimages/Phx00010.gifthis is a top-level object.

Details:

A RecordSet object is used to open a data source and create a dynamic set of records that are organized similar to a database table. The RecordSet object provides flexible access to the records (Rows) and fields (Columns) of retrieved data. Once the data is loaded into a RecordSet, the data can be retrieved as a Row, Column, or a series of contiguous Rows or Columns. When the methods Row(s), Column(s) are called, an object is returned that represents the corresponding table element. The characters in the object may change, but the object will always contain the same Row or Column. When a method is called on an object returned by Row or Column, it will only operate on the table elements represented by that object. The actual data contents of an object returned by a Row or Column may be converted into a text string with the use of the Value method.

To simplify the task of connecting a RecordSet to a database, a Database Wizard is available. The Database Wizard may be displayed when the RecordSet property is double-clicked in the Property Editor.

The RecordSet object is the mechanism for handling data in the DataControl. When you double-click on a DataControl while the form is being edited, a Database Wizard will appear which configures the DataControl's embedded RecordSet object. The RecordSet object has functionality that is designed for use with the DataControl. The Reposition and Validate events are examples of this functionality. Also, the DataControl will not allow you to move before the first record or after the last record of the underlying database.