Unexpected end while deserializing the object

Limits of a Recordset

  • 2 minutes to read

Applies to: Access 2013, Office 2013Applies to: Access 2013, Office 2013

Use the properties to determine BOF and EOF, if a Recordset-Object contains records or whether you are navigating through the records the limits of a RecordsetObject. Imagine BOF and EOF as "phantom data sets" at the beginning and at the end of the RecordsetObject are positioned. Based on the Recordset-Example object under Examining Data, it would now look like this: Use the BOF other EOF properties to determine whether a Recordset Object contains records or whether you've gone beyond the limits of a Recordset object when you move from record to record. Think of BOF other EOF as "phantom" records that are positioned at the beginning and end of the Recordset. Building on the sample Recordset from Examining Data, it would now look like this:

ProductIDProductID

ProductNameProductName

UnitPriceUnitPrice

BOFBOF

77

Uncle Bob's Organic Dried PearsUncle Bob's Organic Dried Pears

30,000030.0000

1414

TofuTofu

23,250023.2500

2828

Rssle SauerkrautRssle Sauerkraut

45,600045.6000

5151

Manjimup Dried Apples Manjimup Dried Apples

53,000053.0000

7474

Longlife TofuLonglife Tofu

10,000010.0000

EOFEOF

The BOFProperty there True (-1) if the current record position is before the first record, and False (0) if the current record position is in or after the first record BOF property returns True (-1) if the current record position is before the first record and False (0) if the current record position is on or after the first record.

The EOFProperty there True back, if the current record position is after the last record, and Falseif the current record position is in or before the last record EOF property returns True if the current record position is after the last record and False if the current record position is on or before the last record.

If the BOF - or the EOF -Property True there is no current record, as shown in the following code: If either the BOF or EOF property is True, there is no current record, as shown in the following code:

If you open a Recordset object containing no records, the BOF other EOF properties are both set to True and the value of the Recordset object's RecordCount property setting depends on the cursor type Recordset object containing no records, the BOF other EOF properties are both set to True and the value of the Recordset object's RecordCount property setting depends on the cursor type. -1 is used for dynamic cursors (CursorType = adOpenDynamic) and 0 will be returned for other cursors. -1 will be returned for dynamic cursors (CursorType = adOpenDynamic) and 0 will be returned for other cursors.

If you have a Recordset-Open an object that contains at least one record, the first record is the current record, and the properties BOF and EOF are False.When you open a Recordset object that contains at least one record, the first record is the current record and the BOF other EOF properties are False.

If you have the last remaining record in the Recordset -Object, the cursor is in an indefinite state. The properties BOF and EOF stay depending on the provider Falseuntil you try to reposition the current record Recordset object, the cursor is left in an indeterminate state. The BOF other EOF properties may remain False until you attempt to reposition the current record, depending upon the provider.