1 / 6

The Recordset Object

The Recordset Object. Recordset Object (ADO). When you use ADO, you manipulate data almost entirely using Recordset objects. A Recordset object represents the entire set of records from a database table or the results of an executed command.

Download Presentation

The Recordset Object

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Recordset Object

  2. Recordset Object (ADO) • When you use ADO, you manipulate data almost entirely using Recordset objects. • A Recordset object represents the entire set of records from a database table or the results of an executed command. • All Recordset objects are constructed using records (rows) and fields (columns).

  3. Recordset Navigation Methods • Navigate through the records in a Recordset with the following Recordset methods • MoveFirst • MoveLast • MoveNext • MovePrevious • Move • Examples: Adodc1.Recordset.Move +5 Adodc1.Recordset.MoveFirst Adodc1.Recordset.MoveLast

  4. RecordsetBOF and EOF Properties • The BOF and EOF properties indicate the beginning or end of the Recordset. • The BOF or EOF property is True when you move one record past the first or last record. • If both BOF and EOF are True, there are no records in the Recordset. • Example: If Adodc1.Recordset.BOF = True Then Adodc1.Recordset.MoveFirst

  5. RecordsetRecordCount Property • Use the RecordCount property to return the number of records in a Recordset object. • The property returns -1 when ADO cannot determine the number of records. • Reading the RecordCount property on a closed Recordset causes an error. • Example: txtRecordCount.Text = Adodc1.Recordset.RecordCount

  6. RecordsetAbsolutePosition Property • Use the AbsolutePosition property to determine the current record number • The AbsolutePosition property is a Long Integer between 1 and the number of records in the Recordset. • Example: txtCurrentRecord.Text = Adodc1.Recordset.AbsolutePosition

More Related