Sự kiện ADO EndOfRecordset
❮ Tham chiếu đối tượng tập bản ghi hoàn chỉnh
Sự kiện là một chương trình con có thể được gọi tự động sau khi một hoạt động cụ thể đã xảy ra.
Sự kiện EndOfRecordset được kích hoạt khi bạn cố gắng di chuyển đến một bản ghi sau bản ghi cuối cùng trong Tập bản ghi. Sự kiện này có thể xảy ra nếu con trỏ bản ghi ở cuối Recordset và phương thức MoveNext được gọi.
Mẹo: Bạn có thể sử dụng sự kiện này để lấy thêm bản ghi từ cơ sở dữ liệu và nối chúng vào cuối Tập bản ghi, sau đó lặp lại lệnh gọi MoveNext.
Lưu ý: Trước khi phương thức này trả về, hãy đặt tham số trạng thái thành adStatusUnwworthyEvent để ngăn các thông báo tiếp theo.
Cú pháp
EndOfRecordset(moredata,status,objrs)
Parameter | Description |
---|---|
moredata | A boolean value that if true it allows to append more data to the end of the Recordset |
status | An EventStatusEnum value that indicates the status of the execution of the event |
objrs | The name of the Recordset Object that triggered this event |
Giá trị EventStatusEnum
Constant | Value | Description |
---|---|---|
adStatusOK | 1 | The operation that caused the event was successful |
adStatusErrorsOccurred | 2 | The operation that caused the event failed |
adStatusCantDeny | 3 | The operation that caused the event cannot be cancelled |
adStatusCancel | 4 | The operation that caused the event is cancelled |
adStatusUnwantedEvent | 5 | Prevents subsequent notifications before the event method has finished executing |
❮ Tham chiếu đối tượng tập bản ghi hoàn chỉnh