Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

EndOfRecordset Event (ADO)

The EndOfRecordset event is called when there is an attempt to move to a row past the end of the Recordset.


EndOfRecordset fMoreData, adStatus, pRecordset
fMoreData

A VARIANT_BOOL value that, if set to VARIANT_TRUE, indicates more rows have been added to the Recordset.

adStatus

An EventStatusEnum status value.

When EndOfRecordset is called, this parameter is set to adStatusOK if the operation that caused the event was successful. It is set to adStatusCantDeny if this event cannot request cancellation of the operation that caused this event.

Before EndOfRecordset returns, set this parameter to adStatusUnwantedEvent to prevent subsequent notifications.

pRecordset

A Recordset object. The Recordset for which this event occurred.

An EndOfRecordset event may occur if the MoveNext operation fails.

This event handler is called when an attempt is made to move past the end of the Recordset object, perhaps as a result of calling MoveNext. However, while in this event, you could retrieve more records from a database and append them to the end of the Recordset. In that case, set fMoreData to VARIANT_TRUE, and return from EndOfRecordset. Then call MoveNext again to access the newly retrieved records.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.