Differences between asp eof and BOF

Source: Internet
Author: User

If Rs. bof then
Indicates that the current pointer is located before the first record.
If Rs. EOF then
The position of the current pointer is after the last record
If not Rs. EOF then
The position of the current pointer does not reach the last record.
If not Rs. bof then
Indicates that the position of the current pointer has not reached the first record.
-------------------------
### The following two items are recommended
If not (Rs. bof and Rs. EOF) then
The pointer is located in the recordset (not the last and first), indicating that there must be a record.
If Rs. bof and Rs. EOF then
No record
EOF: pointer to the end
Bof: pointer to the top
Bof indicates that the current record is located before the first record of the recordset object.
EOF indicates that the current record is located after the last record of the recordset object.
Return Value
The BOF and EOF attributes return boolean values.
Description
The BOF and EOF attributes can be used to determine whether the recordset object contains records, or whether the restriction on the recordset object is exceeded when the recordset object is moved from one record to another.
If the current record is located before the first record, the BOF attribute returns true (-1). If the current record is the first record or is located later, false (0) is returned ).
If the current record is located in the last record of the recordset object, the EOF attribute returns true, and the current record is the last record of the recordset object or is located before it, false is returned.
If the BOF or EOF attribute is true, no current record exists.
If no recordset object is opened, the BOF and EOF attributes are set to true, and the recordcount attribute of the recordset object 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 attributes are false.
If you delete the last record in the recordset object, the BOF and EOF attributes 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.