On ASP EOF and BOF Difference Analysis _ Application Skills

Source: Internet
Author: User
Tags first row
If Rs.bof Then
Indicates that the position of the current pointer is before the first row of records
If Rs.eof Then
Indicates that the position of the current pointer is after the last row of records
If not rs.eof then
Indicates: The position of the current pointer does not reach the last record
If not Rs.bof then
Indicates: The position of the current pointer does not reach the first record
-------------------------
### recommends using the following two articles
If not (RS.BOF and rs.eof) then
Indicates that the pointer is in the recordset (not the last and first), indicating that there must be a record.
If Rs.bof and rs.eof then
said: There is no record
EOF: The pointer arrives at the tail
BOF: The pointer reaches the top of the
BOF indicates that the current record location is before the first record of the Recordset object.
EOF indicates that the current record location is after the last record in the Recordset object.
return value
The BOF and EOF properties return a Boolean value.
Description
Use the BOF and EOF properties to determine whether a Recordset object contains records, or whether the Recordset object's constraints are exceeded when moving from one record to another record.
If the current record is before the first record, the BOF property returns True (-1), and False (0) If the current record is the first record or is located thereafter.
If the EOF property returns True after the current record is in the last record of the Recordset object, False is returned if the current record is the last record of the Recordset object or is in front of it.
If the BOF or EOF property is True, there is no current record.
If you open a Recordset object that does not have a record, the BOF and EOF properties are set to True, and the Recordset object's RecordCount property is set to zero. When you open a Recordset object that contains at least one record, the first record is the current record, and the BOF and EOF properties are False.
If you delete the last record held in the Recordset object, the BOF and EOF properties remain False until the current record is rescheduled.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.